/* public/css/pages/office.css */

/* === СТАТИСТИКА: СІТКА КАРТОК === */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.dashboard-stat-card {
    background: var(--color-bg-white);
    border: 1px solid var(--border-color-light);
    box-shadow: var(--shadow-card-border);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}


.dashboard-stat-card .stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.dashboard-stat-card .stat-icon.icon-friends {
    color: #3b82f6;
}

.dashboard-stat-card .stat-icon.icon-followers {
    color: #8b5cf6;
}

.dashboard-stat-card .stat-icon.icon-posts {
    color: #10b981;
}

.dashboard-stat-card .stat-icon.icon-schools {
    color: #f59e0b;
}

.dashboard-stat-card .stat-icon.icon-events {
    color: #ef4444;
}

.dashboard-stat-card .stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.dashboard-stat-card .stat-label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

/* === СЕКЦІЇ === */
.dashboard-section {
    background: var(--color-bg-white);
    border: 1px solid var(--border-color-light);
    box-shadow: var(--shadow-card-border);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* === ОБГОРТКА ТАБЛИЦІ ДЛЯ ГОРИЗОНТАЛЬНОГО СКРОЛУ === */
.dashboard-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -0.25rem;
    padding: 0 0.25rem;
}


/* === ТАБЛИЦЯ ЗАНЯТЬ === */
.dashboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

.dashboard-table thead th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    color: #64748b;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.dashboard-table tbody td {
    padding: 0.625rem 0.75rem;
    color: #334155;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    vertical-align: top;
    text-align: left;
}


.dashboard-table tbody tr:last-child td {
    border-bottom: none;
}

/* Бейдж ролі */
.role-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.role-badge.role-student {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}

.role-badge.role-coach {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

/* Бейдж статусу */
.session-status-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
}

.session-status-badge.status-pending {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.session-status-badge.status-confirmed {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

/* === СПИСОК КАРТОК (школи, події) === */
.dashboard-card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.dashboard-item-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--color-bg-white);
    border: 1px solid var(--border-color-light);
    border-radius: 0.75rem;
    text-decoration: none;
    color: #1e293b;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}


.dashboard-item-card img {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    object-fit: cover;
    flex-shrink: 0;
}

.dashboard-item-card .item-placeholder-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.dashboard-item-card .item-info {
    min-width: 0;
}

.dashboard-item-card .item-name {
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-item-card .item-meta {
    font-size: 0.75rem;
    color: #64748b;
}


.sub-status-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
}

.sub-status-badge.status-pending {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.sub-status-badge.status-confirmed {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.sub-status-badge.status-rejected {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

/* === ПОРОЖНІЙ СТАН === */
.dashboard-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #94a3b8;
    font-size: 0.9rem;
}

.dashboard-empty i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

/* === КНОПКА КАБІНЕТ В МЕНЮ === */
.profile-menu-row {
    display: flex;
    align-items: stretch;
    /* Розтягуємо по висоті */
    margin: 0.25rem;
    border-radius: 0.5rem;
    overflow: hidden;
    background: transparent;
}

.profile-menu-row .user-menu-link {
    flex: 1;
    margin: 0 !important;
    border-radius: 0 !important;
    padding-right: 0.5rem;
    color: #1f2937 !important;
    /* Чорний колір за замовчуванням */
}

.profile-menu-row .user-menu-link:hover {
    background-color: rgba(37, 99, 235, 0.1) !important;
    color: #2563EB !important;
}

.dashboard-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    color: #1f2937 !important;
    /* Чорний колір за замовчуванням */
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    margin: 0 !important;
    border-radius: 0 !important;
    border-left: 1px solid rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.dashboard-menu-btn:hover {
    background-color: rgba(37, 99, 235, 0.1) !important;
    color: #2563EB !important;
}

.dashboard-menu-btn i {
    font-size: 1.15rem;
}

/* Синхронізація підсвітки при наведенні на рядок */
.profile-menu-row:hover .user-menu-link {
    background-color: rgba(37, 99, 235, 0.1);
    color: #2563EB;
}

.profile-menu-row:hover .dashboard-menu-btn {
    background-color: rgba(37, 99, 235, 0.1);
    color: #2563EB;
}

/* === МОБІЛЬНА АДАПТАЦІЯ === */
@media (max-width: 639px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .dashboard-stat-card {
        padding: 1rem;
    }

    .dashboard-stat-card .stat-number {
        font-size: 1.5rem;
    }

    .dashboard-card-list {
        grid-template-columns: 1fr;
    }

    .dashboard-section {
        padding: 1rem;
    }

    .dashboard-table {
        font-size: 0.8rem;
        min-width: 600px;
    }

    .profile-menu-row {
        margin: 0.5rem;
    }

    .dashboard-menu-btn {
        width: 50px;
    }

    .dashboard-menu-btn i {
        font-size: 1.5rem;
    }
}

/* === ТЕМНА ТЕМА === */
.dark .dashboard-stat-card,
.dark .dashboard-section,
.dark .dashboard-item-card,
.dark .dashboard-sub-item {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark .dashboard-stat-card .stat-number,
.dark .dashboard-section-title,
.dark .dashboard-item-card .item-name {
    color: #e2e8f0;
}

.dark .dashboard-stat-card .stat-label,
.dark .dashboard-table thead th,
.dark .dashboard-item-card .item-meta,
.dark .dashboard-sub-item .sub-details {
    color: #94a3b8;
}

.dark .dashboard-table tbody td {
    color: #cbd5e1;
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.dark .dashboard-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.08);
}

/* === ОФОРМЛЕННЯ ЧЕКУ ЗАМОВЛЕННЯ === */
.receipt-paper {
    position: relative;
    background-color: #fcfcfc !important;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1), 0 0 15px -3px rgba(0, 0, 0, 0.05) !important;
    border-radius: 2px !important;
    margin-top: 15px;
    margin-bottom: 15px;
    border-left: 1px solid rgba(0, 0, 0, 0.02);
    border-right: 1px solid rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.receipt-paper:hover {
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.15), 0 0 25px -5px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-2px);
}

.receipt-edge-top {
    position: absolute;
    top: -10px !important;
    left: 0;
    width: 100%;
    height: 10px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 10' preserveAspectRatio='none'%3E%3Cpath d='M0,10 C5,10 5,0 10,0 C15,0 15,10 20,10 Z' fill='%23fcfcfc'/%3E%3C/svg%3E");
    background-size: 16px 10px;
    background-repeat: repeat-x;
    z-index: 10;
}

.receipt-edge-bottom {
    position: absolute;
    bottom: -10px !important;
    left: 0;
    width: 100%;
    height: 10px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 10' preserveAspectRatio='none'%3E%3Cpath d='M0,0 C5,0 5,10 10,10 C15,10 15,0 20,0 L20,0 L0,0 Z' fill='%23fcfcfc'/%3E%3C/svg%3E");
    background-size: 16px 10px;
    background-repeat: repeat-x;
    z-index: 10;
}

.dark .receipt-paper {
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 15px -3px rgba(0, 0, 0, 0.3) !important;
}

.dark .receipt-edge-top {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 10' preserveAspectRatio='none'%3E%3Cpath d='M0,10 C5,10 5,0 10,0 C15,0 15,10 20,10 Z' fill='%231e293b'/%3E%3C/svg%3E");
}

.dark .receipt-edge-bottom {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 10' preserveAspectRatio='none'%3E%3Cpath d='M0,0 C5,0 5,10 10,10 C15,10 15,0 20,0 L20,0 L0,0 Z' fill='%231e293b'/%3E%3C/svg%3E");
}