/* Admin Dashboard Styles */

.admin-container {
    min-height: 100vh;
    background: #f5f7fa;
    position: relative;
}

.admin-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 30px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.admin-header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.admin-header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.admin-header p {
    margin: 5px 0 0 0;
    opacity: 0.9;
    font-size: 1rem;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: white;
    color: #2a5298;
    transform: translateY(-2px);
}

.admin-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
    transition: opacity 0.3s ease;
}

.admin-content.detail-open {
    opacity: 0.3;
    pointer-events: none;
}

/* Statistics Cards */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.stat-card h3 {
    margin: 0 0 8px 0;
    font-size: 2.5rem;
    color: #2a5298;
    font-weight: 700;
}

.stat-card p {
    margin: 0;
    color: #666;
    font-size: 1rem;
}

/* Table Container */
.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.table-title {
    padding: 20px;
    margin: 0;
    color: #2a5298;
    font-size: 1.25rem;
    border-bottom: 2px solid #f0f0f0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
}

.admin-table thead {
    background: #2a5298;
    color: white;
}

.admin-table th {
    padding: 16px 16px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.admin-table td {
    padding: 16px 16px;
    border-bottom: 1px solid #e0e0e0;
}

.admin-table tbody tr.clickable-row {
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-table tbody tr.clickable-row:hover {
    background: #e3f2fd;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(42, 82, 152, 0.1);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

/* Detail Modal - Mobile Style */
.detail-modal {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 600px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.detail-modal.show {
    right: 0;
}

.detail-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 10;
}

.btn-back {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    margin-bottom: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-back:hover {
    transform: translateX(-4px);
}

.back-arrow {
    font-size: 1.5rem;
    font-weight: bold;
}

.detail-header h2 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
}

.detail-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    -webkit-overflow-scrolling: touch;
}

.detail-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid #2a5298;
}

.detail-section h3 {
    margin: 0 0 16px 0;
    color: #2a5298;
    font-size: 1.25rem;
    font-weight: 600;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    font-weight: 600;
    color: #555;
    flex: 0 0 45%;
}

.detail-row .value {
    color: #333;
    flex: 1;
    text-align: right;
    word-break: break-word;
}

/* No Data Message */
.no-data {
    background: white;
    padding: 60px 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.no-data h3 {
    color: #2a5298;
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.no-data p {
    color: #666;
    font-size: 1rem;
}

/* Loading Spinner */
.admin-content .loading-spinner {
    text-align: center;
    padding: 60px 20px;
}

.admin-content .spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2a5298;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-header h1 {
        font-size: 1.5rem;
    }

    .admin-header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-logout {
        width: 100%;
    }

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-table {
        font-size: 0.9rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 12px 10px;
    }

    .detail-modal {
        max-width: 100%;
    }

    .detail-content {
        padding: 16px;
    }

    .detail-row {
        flex-direction: column;
        gap: 8px;
    }

    .detail-row .label {
        flex: auto;
    }

    .detail-row .value {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .stat-card h3 {
        font-size: 2rem;
    }

    .detail-header h2 {
        font-size: 1.5rem;
    }
}
