/* ============================================
   COMPONENTS - Componentes específicos
   ============================================ */

/* DASHBOARD GRID */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 0 var(--spacing-lg) var(--spacing-lg);
    padding-bottom: calc(var(--bottom-nav-height) + 30px);
}

.dashboard-card {
    background: var(--light-green);
    padding: 20px 10px;
    border-radius: var(--border-radius-md);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--black);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.dashboard-card[style*="display: none"] {
    display: none !important;
}

.dashboard-icon {
    font-size: 32px;
    margin-bottom: 5px;
}

.dashboard-label {
    font-size: 14px;
    color: var(--black);
    line-height: 1.3;
}

/* USER HEADER */
.header {
    padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-xl);
    background: var(--white);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: var(--spacing-lg);
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius-circle);
    object-fit: cover;
}

.user-welcome {
    font-size: var(--font-size-sm);
    color: var(--gray-text);
}

.user-name {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--black);
}

.bell-icon {
    margin-left: auto;
    font-size: 24px;
    cursor: pointer;
}

.hero-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-xl);
}

/* SPACES / RESERVAS */
.spaces-list {
    padding: var(--spacing-lg);
    padding-bottom: calc(var(--bottom-nav-height) + 30px);
}

.space-card {
    background: var(--white);
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.space-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.space-info {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.space-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--black);
    margin-bottom: 5px;
}

.space-description {
    font-size: var(--font-size-sm);
    color: var(--gray-text);
}

.reserve-btn {
    background: var(--light-green);
    border: none;
    padding: 12px 20px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 20px;
    transition: var(--transition);
}

.reserve-btn:hover {
    background: var(--primary-green);
    color: var(--white);
}

/* CATEGORY SIDEBAR */
.category-sidebar {
    position: fixed;
    left: 0;
    top: 120px;
    bottom: 110px;
    background: var(--primary-green);
    color: var(--white);
    padding: 18px 10px;
    border-radius: 0 18px 18px 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between; /* <- distribuir los items en todo el alto */
    gap: var(--spacing-md);
    overflow: hidden;
    transition: background .18s ease;
}

.category-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: var(--font-size-base);
    font-weight: 600;
    letter-spacing: 2px;
    padding: 8px 6px;
    cursor: pointer;
    transition: transform .18s cubic-bezier(.2,.9,.3,1), color .18s ease, background .18s ease, box-shadow .18s ease;
    border-radius: 10px;
    opacity: 0.95;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px; /* ancho fijo para que el fondo cubra bien el label */
    height: auto;
    user-select: none;
    transform: rotate(180deg);
    transform-origin: center center;
}

/* efecto al pasar el mouse / foco (indica cuál se va a seleccionar) */
.category-label:hover,
.category-label:focus {
    transform: rotate(180deg) translateX(-6px) scale(1.04);
    opacity: 1;
    color: #fff;
    text-shadow: 0 1px 0 rgba(0,0,0,0.12);
}

/* estilo del item activo */
.category-label.active {
    background:green; /*linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.06)); */
    color: #fff;
    transform: rotate(180deg) translateX(-6px) scale(1.02);
    box-shadow: 0 8px 20px rgba(250, 250, 250, 0.918);
    border-left: 3px solid rgba(255,255,255,0.18); /* acento para distinguir aún más */
}


/* CALENDAR */
.calendar-container {
    padding: var(--spacing-lg);
    padding-bottom: calc(var(--bottom-nav-height) + 30px);
}

.calendar-header {
    display: flex;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.month-selector, .year-selector {
    flex: 1;
    padding: 12px;
    background: var(--light-gray);
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-md);
}

.calendar {
    background: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.weekday {
    text-align: center;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--gray-text);
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--spacing-sm);
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-circle);
    font-size: var(--font-size-base);
    cursor: pointer;
    transition: var(--transition);
}

.calendar-day:hover {
    background: var(--light-gray);
}

.calendar-day.selected {
    background: var(--light-green);
    font-weight: 600;
}

.calendar-day.other-month {
    color: #ccc;
}

/* TIME SLOTS */
.time-slots {
    margin-top: var(--spacing-xl);
}

.time-slots-title {
    text-align: center;
    font-size: var(--font-size-md);
    margin-bottom: 15px;
    color: var(--black);
}

.time-slot {
    padding: 15px;
    background: var(--light-green);
    border-radius: var(--border-radius-sm);
    text-align: center;
    margin-bottom: var(--spacing-sm);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.time-slot:hover {
    background: var(--primary-green);
    color: var(--white);
}

.time-slot.selected {
    background: var(--primary-green);
    color: var(--white);
}

.time-slot.unavailable {
    background: var(--light-gray);
    color: var(--gray-text);
    cursor: not-allowed;
}

.time-slot.unavailable:hover {
    background: var(--light-gray);
    color: var(--gray-text);
}

/* CONFIRMATION */
.confirmation-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xxl) var(--spacing-lg);
    text-align: center;
    min-height: calc(100vh - var(--bottom-nav-height));
}

.success-icon {
    width: 120px;
    height: 120px;
    background: var(--primary-green);
    border-radius: var(--border-radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-xl);
    font-size: 60px;
    color: var(--white);
}

.confirmation-title {
    font-size: var(--font-size-xl);
    color: var(--gray-text);
    margin-bottom: var(--spacing-lg);
}

.confirmation-message {
    font-size: var(--font-size-base);
    color: var(--gray-text);
    margin-bottom: var(--spacing-xxl);
}

/* TABS */
.tabs {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-lg);
}

.tab {
    flex: 1;
    padding: 12px;
    background: var(--light-gray);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: var(--font-size-base);
    transition: var(--transition);
}

.tab.active {
    background: var(--light-green);
    font-weight: 600;
}

/* HISTORY */
.history-list {
    padding: 0 var(--spacing-lg) var(--spacing-lg);
    padding-bottom: calc(var(--bottom-nav-height) + 30px);
}

.history-card {
    background: var(--light-green);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-md);
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.history-icon {
    font-size: 36px;
    flex-shrink: 0;
}

.history-text {
    font-size: var(--font-size-base);
    color: var(--black);
    line-height: 1.5;
}

/* SPLASH SCREEN */
.splash-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--spacing-lg);
    text-align: center;
}

.splash-image {
    width: 100%;
    max-width: 300px;
    margin-bottom: var(--spacing-xxl);
    background: linear-gradient(to bottom, #87CEEB, #90EE90);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
}

.splash-title {
    font-size: 28px;
    font-weight: 400;
    color: var(--dark-blue);
    margin-bottom: var(--spacing-xxl);
    line-height: 1.4;
}

/* PERFIL */
.profile-header {
    text-align: center;
    padding: 40px 20px 30px;
    background: var(--white);
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 15px;
    background: var(--light-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    position: relative;
    cursor: pointer;
}

.avatar-edit-icon {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--primary-green);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border: 3px solid white;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 5px;
}

.profile-email {
    font-size: 14px;
    color: var(--gray-text);
}

.profile-menu {
    padding-bottom: calc(var(--bottom-nav-height) + 30px);
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    background: var(--white);
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--black);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.menu-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.menu-icon {
    width: 40px;
    height: 40px;
    background: var(--light-gray);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 15px;
}

.menu-content {
    flex: 1;
}

.menu-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 2px;
}

.menu-subtitle {
    font-size: 12px;
    color: var(--gray-text);
}

.menu-arrow {
    color: var(--gray-text);
    font-size: 20px;
}

.logout-section {
    padding: 20px;
    margin-top: 20px;
}

.btn-logout {
    width: 100%;
    padding: 18px;
    background: #d84315;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    background: #bf360c;
    transform: translateY(-2px);
}

.divider {
    height: 1px;
    background: var(--light-gray);
    margin: 20px 0;
}

/* LOGIN / REGISTER */
.login-screen, .register-screen {
    padding: 60px 30px;
}

.login-title {
    font-size: var(--font-size-huge);
    font-weight: 700;
    color: var(--black);
    margin-bottom: var(--spacing-xxl);
}

.register-title {
    font-size: var(--font-size-xxl);
    font-weight: 700;
    color: var(--dark-blue);
    text-align: center;
    margin-bottom: var(--spacing-xl);
    line-height: 1.3;
}

.register-subtitle {
    font-size: var(--font-size-base);
    color: var(--black);
    margin-bottom: var(--spacing-xl);
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
}

.login-footer, .back-link {
    text-align: center;
    margin-top: var(--spacing-xxl);
    color: var(--black);
    font-size: var(--font-size-base);
    line-height: 1.6;
}

.back-link {
    text-decoration: none;
}

.back-link:hover {
    color: var(--primary-green);
}

/* RESPONSIVE */
@media (min-width: 768px) {
    .dashboard-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 800px;
        margin: 0 auto;
        padding-bottom: calc(var(--bottom-nav-height) + 30px);
    }

    .spaces-list {
        max-width: 900px;
        margin: 0 auto;
    }

    .calendar-container {
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (min-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(5, 1fr);
        max-width: 1000px;
    }
}

/* .category-label.active {
    background-color: var(--primary-color);
    color: white;
} */