/* ==================== Admin Dashboard Styles ==================== */

/* Login Screen */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--darker-bg) 0%, #1a1a2e 100%);
    padding: 20px;
}

.login-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 50px;
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo .logo-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.login-logo h1 {
    font-family: 'EnglishRegular', 'Chinese';
    font-size: 1.8rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-card h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-primary);
    font-size: 1.3rem;
}

.login-card .form-group {
    margin-bottom: 20px;
}

.login-card label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.login-card input {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.login-card input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.2);
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: var(--gradient-1);
    border: none;
    border-radius: 12px;
    color: white;
    font-family: 'EnglishRegular', 'Chinese';
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.4);
}

.login-hint {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Admin Panel Layout */
.admin-panel {
    display: flex;
    min-height: 100vh;
    background: var(--dark-bg);
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--darker-bg);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header .logo-icon {
    font-size: 1.8rem;
}

.sidebar-header .logo-text {
    font-family: 'EnglishRegular', 'Chinese';
    font-size: 1.3rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(108, 92, 231, 0.1);
}

.nav-item.active {
    color: var(--primary-color);
    background: rgba(108, 92, 231, 0.15);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-1);
}

.nav-item .icon {
    font-size: 1.2rem;
}

.nav-item .badge {
    margin-left: auto;
    background: #ff6b6b;
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
}

.sidebar-footer {
    padding: 20px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.logout-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'EnglishRegular', 'Chinese';
}

.logout-btn:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
}

/* Top Bar */
.top-bar {
    background: var(--card-bg);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 50;
}

/* Hamburger menu button (hidden on desktop, visible on mobile) */
.sidebar-toggle {
    display: none;
}

.top-bar h1,
.top-bar h2 {
    font-family: 'EnglishRegular', 'Chinese';
    font-size: 1.5rem;
    color: var(--text-primary);
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-name {
    color: var(--text-secondary);
}

.admin-badge {
    background: var(--gradient-1);
    color: white;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 6px;
}

/* Content Sections */
.content-section {
    display: none;
    padding: 30px;
    animation: fadeIn 0.3s ease;
}

.content-section.active {
    display: block;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(108, 92, 231, 0.1);
    border-radius: 12px;
}

.stat-info h3 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.stat-number {
    font-family: 'EnglishRegular', 'Chinese';
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Recent Activity */
.recent-activity {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.recent-activity h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
    font-family: 'EnglishRegular', 'Chinese';
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.activity-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(108, 92, 231, 0.1);
    border-radius: 8px;
    font-size: 1.2rem;
}

.activity-content {
    flex: 1;
}

.activity-content p {
    color: var(--text-primary);
    margin-bottom: 3px;
}

.activity-content span {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h3 {
    color: var(--text-primary);
    font-family: 'EnglishRegular', 'Chinese';
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 8px;
}

.filter-btn {
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: 'EnglishRegular', 'Chinese';
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(108, 92, 231, 0.1);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.filter-bar select {
    padding: 10px 20px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
}

/* Data Table */
.data-table-container {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.data-table td {
    color: var(--text-primary);
}

.data-table tr:hover td {
    background: rgba(108, 92, 231, 0.05);
}

.action-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.action-btn.view {
    background: rgba(108, 92, 231, 0.2);
    color: var(--primary-color);
}

.action-btn.view:hover {
    background: var(--primary-color);
    color: white;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: 'EnglishRegular', 'Chinese';
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #ff6b6b;
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    max-height: 50vh;
}

/* Processing reason textarea */
.modal-reason-group {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-reason-group label {
    display: block;
    margin-bottom: 10px;
    font-family: 'EnglishRegular', 'Chinese';
    font-size: 0.95rem;
    color: #b0b0b0;
    font-weight: 500;
}

.modal-reason-group label .required-star {
    color: #ff6b6b;
    margin-left: 2px;
}

.modal-reason-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #e0e0e0;
    font-family: 'EnglishRegular', 'Chinese';
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
    min-height: 80px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.modal-reason-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.15);
    background: rgba(255, 255, 255, 0.06);
}

.modal-reason-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'EnglishRegular', 'Chinese';
    transition: all 0.3s ease;
}

.modal-btn.punish {
    background: #ff6b6b;
    color: white;
}

.modal-btn.accept {
    background: #00b894;
    color: white;
}

.modal-btn.no-action {
    background: #fdcb6e;
    color: #2d3436;
}

.modal-btn.cancel {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Status Badge Styles */
.status-badge.punished {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
}

.status-badge.accepted {
    background: rgba(0, 184, 148, 0.2);
    color: #00b894;
}

.status-badge.no-action {
    background: rgba(253, 203, 110, 0.2);
    color: #fdcb6e;
}

.status-badge.cancelled {
    background: rgba(99, 110, 114, 0.2);
    color: #b2bec3;
}

/* Responsive */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .data-table {
        min-width: 700px;
    }
}

@media (max-width: 768px) {
    /* Hamburger menu button */
    .sidebar-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 36px;
        height: 36px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 6px;
        z-index: 1001;
        margin-right: 15px;
    }

    .sidebar-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background: var(--text-primary);
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .sidebar-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .sidebar-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .sidebar-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Sidebar overlay */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        z-index: 998;
    }

    .sidebar-overlay.active {
        display: block;
    }

    /* Sidebar */
    .sidebar {
        width: 260px;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    /* Main content area */
    .main-content {
        margin-left: 0;
        padding: 20px 15px;
    }

    /* Top bar */
    .top-bar {
        flex-wrap: wrap;
        gap: 10px;
        padding-bottom: 15px;
        margin-bottom: 20px;
    }

    .top-bar h1,
    .top-bar h2 {
        font-size: 1.2rem;
    }

    .admin-info {
        font-size: 0.85rem;
    }

    .admin-badge {
        font-size: 0.65rem;
        padding: 3px 8px;
    }

    /* Stats cards */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 18px;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    /* Section header */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .section-header h3 {
        font-size: 1.1rem;
    }

    /* Filter buttons */
    .filter-tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }

    .filter-btn {
        flex: 1;
        min-width: 60px;
        padding: 8px 12px;
        font-size: 0.85rem;
        text-align: center;
    }

    /* Table horizontal scroll */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 12px;
    }

    .data-table {
        min-width: 600px;
        font-size: 0.85rem;
    }

    .data-table th,
    .data-table td {
        padding: 10px 12px;
    }

    .data-table th {
        font-size: 0.8rem;
    }

    /* Action buttons */
    .action-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    /* Recent activity */
    .recent-activity {
        padding: 18px;
    }

    .recent-activity h3 {
        font-size: 1.1rem;
    }

    .activity-item {
        padding: 12px;
        gap: 10px;
    }

    .activity-icon {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }

    .activity-content p {
        font-size: 0.9rem;
    }

    .activity-content span {
        font-size: 0.75rem;
    }

    /* Modal full screen */
    .modal-content {
        width: 95%;
        max-width: none;
        max-height: 90vh;
        border-radius: 16px;
    }

    .modal-header {
        padding: 18px;
    }

    .modal-header h3 {
        font-size: 1.1rem;
    }

    .modal-body {
        padding: 18px;
        max-height: 55vh;
    }

    .modal-footer {
        flex-direction: column;
        gap: 10px;
        padding: 18px;
    }

    .modal-btn {
        padding: 14px;
        font-size: 0.95rem;
        border-radius: 10px;
    }

    /* Detail rows stack vertically */
    .detail-row {
        flex-direction: column;
        gap: 4px;
    }

    .detail-label {
        width: 100%;
    }

    .detail-text {
        font-size: 0.9rem;
        padding: 12px;
    }

    .modal-reason-group textarea {
        min-height: 70px;
        font-size: 0.9rem;
    }

    /* Login page */
    .login-card {
        margin: 0 15px;
        padding: 35px 25px;
    }

    .login-card h2 {
        font-size: 1.3rem;
    }

    .login-card .form-group input {
        padding: 14px 16px;
        font-size: 0.95rem;
    }

    .login-btn {
        padding: 15px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 15px 10px;
    }

    .stats-grid {
        gap: 10px;
    }

    .stat-card {
        padding: 15px;
        gap: 10px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }

    .stat-info h3 {
        font-size: 0.8rem;
    }

    .stat-number {
        font-size: 1.3rem;
    }

    .data-table {
        min-width: 520px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px;
        font-size: 0.78rem;
    }

    .modal-content {
        width: 100%;
        max-height: 95vh;
        border-radius: 12px 12px 0 0;
        position: fixed;
        bottom: 0;
    }

    .modal-body {
        max-height: 50vh;
    }
}
