/* ===========================================
   rapitalento - Custom Styles
   =========================================== */

:root {
    --rt-primary: #2563eb;
    --rt-primary-dark: #1d4ed8;
    --rt-primary-light: #dbeafe;
    --rt-secondary: #059669;
    --rt-accent: #f59e0b;
    --rt-dark: #1e293b;
    --rt-gray: #64748b;
    --rt-light: #f8fafc;
    --rt-danger: #dc2626;
    --rt-sidebar-width: 260px;
}

/* --- Global --- */

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--rt-light);
    color: var(--rt-dark);
}

a { color: var(--rt-primary); }
a:hover { color: var(--rt-primary-dark); }

/* --- Sidebar --- */

.rt-wrapper {
    display: flex;
    min-height: 100vh;
}

.rt-sidebar {
    width: var(--rt-sidebar-width);
    background: var(--rt-dark);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.rt-sidebar-header {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rt-sidebar-brand {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rt-sidebar-brand:hover { color: #fff; }
.rt-sidebar-brand i { font-size: 1.5rem; color: var(--rt-accent); }

.rt-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.rt-sidebar-nav .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
    transition: all 0.15s;
}

.rt-sidebar-nav .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.rt-sidebar-nav .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
    border-left-color: var(--rt-accent);
}

.rt-sidebar-nav .nav-link i { width: 1.25rem; text-align: center; }

.rt-sidebar-divider {
    color: rgba(255,255,255,0.3);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 1rem 1rem 0.3rem;
    font-weight: 600;
}

.rt-sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
}

.rt-sidebar-footer .btn-logout {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-size: 0.85rem;
}

.rt-sidebar-footer .btn-logout:hover { color: #fff; }

/* --- Main Content --- */

.rt-main {
    flex: 1;
    margin-left: var(--rt-sidebar-width);
    padding: 1.5rem;
    min-width: 0;
}

.rt-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.rt-topbar h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

/* --- Cards --- */

.rt-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.rt-stat-card {
    text-align: center;
}

.rt-stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--rt-primary);
}

.rt-stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--rt-gray);
    margin-top: 0.25rem;
}

/* --- Invite Card --- */

.rt-invite-card {
    border-left: 4px solid var(--rt-accent);
    transition: box-shadow 0.2s;
}

.rt-invite-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.rt-invite-countdown {
    font-size: 0.85rem;
    color: var(--rt-danger);
    font-weight: 600;
}

/* --- Status Badges --- */

.rt-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.rt-badge-borrador { background: #e2e8f0; color: #475569; }
.rt-badge-buscando { background: #fef3c7; color: #92400e; }
.rt-badge-parcial { background: #fed7aa; color: #9a3412; }
.rt-badge-cubierta { background: #d1fae5; color: #065f46; }
.rt-badge-completada { background: #dbeafe; color: #1e40af; }
.rt-badge-cancelada { background: #fecaca; color: #991b1b; }
.rt-badge-expirada { background: #f1f5f9; color: #64748b; }
.rt-badge-activo { background: #d1fae5; color: #065f46; }
.rt-badge-pendiente { background: #fef3c7; color: #92400e; }
.rt-badge-suspendido { background: #fecaca; color: #991b1b; }

/* --- Chat Interface --- */

.rt-chat-container {
    max-width: 700px;
    margin: 0 auto;
}

.rt-chat-messages {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
}

.rt-chat-bubble {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.rt-chat-bubble-user {
    background: var(--rt-primary);
    color: #fff;
    margin-left: auto;
    border-bottom-right-radius: 0.25rem;
}

.rt-chat-bubble-system {
    background: #f1f5f9;
    color: var(--rt-dark);
    border-bottom-left-radius: 0.25rem;
}

.rt-chat-input-area {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.rt-chat-input-area input {
    flex: 1;
}

/* --- Availability Grid --- */

.rt-avail-grid {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    gap: 1px;
    background: #e2e8f0;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
    font-size: 0.8rem;
}

.rt-avail-cell {
    background: #fff;
    padding: 0.3rem;
    text-align: center;
    min-height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.1s;
    user-select: none;
}

.rt-avail-cell:hover { background: #f8fafc; }
.rt-avail-cell.active { background: var(--rt-primary-light); }
.rt-avail-cell.header { background: #f1f5f9; font-weight: 600; cursor: default; }
.rt-avail-cell.time-label { background: #f8fafc; font-size: 0.75rem; color: var(--rt-gray); cursor: default; }

/* --- Wizard Steps --- */

.rt-wizard-steps {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 2rem;
}

.rt-wizard-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--rt-gray);
    font-size: 0.85rem;
    position: relative;
}

.rt-wizard-step .step-num {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.rt-wizard-step.active .step-num {
    background: var(--rt-primary);
    color: #fff;
}

.rt-wizard-step.completed .step-num {
    background: var(--rt-secondary);
    color: #fff;
}

.rt-wizard-step.active { color: var(--rt-dark); font-weight: 600; }

/* --- Login Page --- */

.rt-login-container {
    max-width: 420px;
    margin: 4rem auto;
}

.rt-login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.rt-login-logo h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--rt-primary);
}

.rt-login-logo p {
    color: var(--rt-gray);
    font-size: 0.95rem;
}

/* --- Star Rating --- */

.star-input {
    transition: transform 0.1s;
}

.star-input:hover {
    transform: scale(1.2);
}

/* --- Responsive --- */

@media (max-width: 991.98px) {
    .rt-sidebar {
        transform: translateX(-100%);
    }
    .rt-sidebar.show {
        transform: translateX(0);
    }
    .rt-main {
        margin-left: 0;
    }
    .btn-sidebar-toggle {
        display: inline-flex !important;
    }
}

@media (min-width: 992px) {
    .btn-sidebar-toggle {
        display: none !important;
    }
}

/* --- Empty State --- */

.rt-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--rt-gray);
}

.rt-empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

/* --- Misc --- */

.text-muted-sm { font-size: 0.85rem; color: var(--rt-gray); }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
