/* Anyukanet Admin - Modern UI Styles with Sidebar */
:root {
    --primary: #4267B2;
    --primary-light: #6081c7;
    --primary-dark: #3b5998;
    --bg-light: #F7FAFC;
    --bg-card: rgba(255, 255, 255, 0.95);
    --white: #FFFFFF;
    --text-main: #2D3748;
    --text-muted: #718096;
    --text-light: #A0AEC0;
    --success: #48BB78;
    --success-light: #68D391;
    --warning: #ECC94B;
    --danger: #F56565;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.08);
    --radius: 20px;
    --radius-sm: 12px;
    --radius-full: 50px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    width: 100%;
    -webkit-font-smoothing: antialiased;
}

.hidden {
    display: none !important;
}

/* ===== Typography ===== */
h1, h2, h3 {
    font-weight: 800;
    color: var(--text-main);
}

/* ===== Header ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
}

.header-inner {
    width: 100%;
    max-width: 100%;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 800;
    font-size: 1.2rem;
    min-width: 0;
    flex-shrink: 1;
    overflow: hidden;
}

.logo img {
    height: 40px;
    width: auto;
    flex-shrink: 0;
}

.logo span {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
    overflow: hidden;
}

.logo-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo-subtitle {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Login/Logout Button */
.login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.login-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 103, 178, 0.3);
}

.login-btn svg {
    width: 18px;
    height: 18px;
}

.login-btn-text {
    display: inline;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-main);
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
}

/* ===== Main Layout ===== */
.main-container {
    display: flex;
    min-height: 100vh;
    padding-top: 70px;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* ===== Sidebar Navigation ===== */
.sidebar {
    width: 280px;
    background: var(--white);
    padding: 30px 0;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.03);
    position: fixed;
    left: 0;
    top: 70px;
    bottom: 0;
    overflow-y: auto;
    z-index: 50;
}

.nav-menu {
    list-style: none;
    padding: 0 15px;
}

.nav-item {
    margin-bottom: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 15px rgba(66, 103, 178, 0.3);
}

.nav-link svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.nav-section-title {
    padding: 20px 20px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 40px;
    min-height: calc(100vh - 70px);
    max-width: calc(100vw - 280px);
    overflow-x: hidden;
}

/* ===== Page Header ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    max-width: 100%;
    flex-wrap: wrap;
    gap: 20px;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

/* ===== Sidebar Overlay (mobile) ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
}

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

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(66, 103, 178, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 103, 178, 0.4);
}

.btn-primary:disabled {
    background: #A0AEC0;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--white);
    color: var(--text-main);
    border: 2px solid #E2E8F0;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}

.btn-ghost:hover {
    background: var(--bg-light);
    color: var(--text-main);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-link {
    background: linear-gradient(135deg, #1877F2, #42A5F5);
    color: var(--white);
    width: 100%;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(24, 119, 242, 0.3);
}

.btn-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(24, 119, 242, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #38A169);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

.btn-success:disabled {
    background: #A0AEC0;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #E53E3E);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(245, 101, 101, 0.3);
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 101, 101, 0.4);
}

.btn-danger:disabled {
    background: #A0AEC0;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* ===== Auth Container ===== */
#auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, #EBF4FF 0%, #F7FAFC 100%);
}

.auth-box {
    background: var(--white);
    padding: 48px 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 420px;
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 20px;
}

.auth-header h1 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--primary);
}

.auth-header .subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
}

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

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
    font-size: 0.9rem;
}

.phone-input-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid #E2E8F0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: var(--transition);
}

.phone-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(66, 103, 178, 0.1);
}

.country-code {
    padding: 14px 16px;
    background: var(--bg-light);
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
    border-right: 2px solid #E2E8F0;
}

.phone-input-wrapper input {
    flex: 1;
    border: none;
    padding: 14px 16px;
    font-size: 1rem;
    outline: none;
    background: transparent;
    font-family: inherit;
}

#verification-code {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #E2E8F0;
    border-radius: var(--radius-sm);
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 12px;
    transition: var(--transition);
    font-family: inherit;
}

#verification-code:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(66, 103, 178, 0.1);
}

#recaptcha-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.auth-box .btn {
    width: 100%;
    margin-bottom: 12px;
    padding: 14px 24px;
}

.error-message {
    background: linear-gradient(135deg, #FFF5F5, #FED7D7);
    color: #C53030;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-top: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-left: 4px solid var(--danger);
}

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    transition: var(--transition);
    max-width: 100%;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #EDF2F7;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

/* ===== Stats Cards ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: linear-gradient(135deg, #E8F0FE, #D4E4FC);
    color: var(--primary);
}

.stat-icon.green {
    background: linear-gradient(135deg, #E6FFFA, #C6F6D5);
    color: var(--success);
}

.stat-icon.yellow {
    background: linear-gradient(135deg, #FFFFF0, #FEFCBF);
    color: var(--warning);
}

.stat-icon.red {
    background: linear-gradient(135deg, #FFF5F5, #FED7D7);
    color: var(--danger);
}

.stat-icon svg {
    width: 28px;
    height: 28px;
}

.stat-info h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* ===== Pages ===== */
.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Timer ===== */
.timer {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #FFFFF0, #FEFCBF);
    color: #975A16;
    padding: 10px 18px;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 700;
}

.timer.warning {
    background: linear-gradient(135deg, #FFF5F5, #FED7D7);
    color: #C53030;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.timer-icon {
    font-size: 1.1rem;
}

/* ===== Loading & Empty States ===== */
.loading-state,
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #E2E8F0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Button Spinner */
.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

.btn.loading .btn-spinner {
    display: inline-block;
}

.btn.loading .btn-icon,
.btn.loading .btn-text {
    display: none;
}

.btn-secondary .btn-spinner {
    border-color: rgba(0, 0, 0, 0.15);
    border-top-color: var(--text-main);
}

.empty-icon {
    font-size: 60px;
    display: block;
    margin-bottom: 20px;
    opacity: 0.8;
}

.empty-state h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-main);
    font-weight: 700;
}

.empty-state p {
    font-size: 0.95rem;
}

/* ===== Task Card ===== */
.task-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    max-width: 700px;
}

.task-card:hover {
    box-shadow: var(--shadow-hover);
}

.task-card-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-card-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
}

.task-points-total {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1rem;
}

.task-card-body {
    padding: 25px;
}

.task-description {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 10px;
}

.task-date {
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 600;
    display: block;
    margin-bottom: 15px;
}

.task-card-footer {
    padding: 20px 25px;
    background: var(--bg-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

/* ===== Screenshot Upload ===== */
.screenshot-upload {
    margin-bottom: 25px;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 35px;
    border: 2px dashed #CBD5E0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-light);
    background: var(--bg-light);
}

.upload-label:hover {
    border-color: var(--primary);
    background: rgba(66, 103, 178, 0.03);
    color: var(--primary);
}

.upload-label.drag-over {
    border-color: var(--success);
    background: rgba(72, 187, 120, 0.1);
    color: var(--success);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 32px;
    opacity: 0.7;
}

#upload-text {
    font-size: 0.95rem;
    font-weight: 600;
}

.screenshot-previews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.screenshot-preview-item {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid #E2E8F0;
    background: var(--bg-light);
}

.screenshot-preview-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.preview-size {
    font-size: 11px;
    color: var(--text-light);
    text-align: center;
    padding: 3px 0;
    background: var(--bg-light);
}

.remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border: none;
    background: var(--text-main);
    color: var(--white);
    border-radius: 50%;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.remove-btn:hover {
    background: var(--danger);
}

/* ===== Skip Info ===== */
.skip-info {
    text-align: center;
    margin-top: 20px;
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.skip-limit-badge {
    background: linear-gradient(135deg, #FFF5F5, #FED7D7);
    color: #C53030;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    animation: pulse 1.5s infinite;
}

/* ===== Screenshot warning ===== */
.screenshot-warning {
    color: #C53030;
    font-weight: 700;
    font-size: 0.95rem;
    background: linear-gradient(135deg, #FFF5F5, #FED7D7);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--danger);
    margin: 20px 0;
}

/* ===== Filter Buttons ===== */
.filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #E2E8F0;
    background: var(--white);
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: var(--transition);
    font-family: inherit;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(66, 103, 178, 0.3);
}

/* ===== Tasks List ===== */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-list-item {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 20px 25px;
    border: 2px solid transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.task-list-item:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 15px rgba(66, 103, 178, 0.1);
}

.task-list-item.TOCHECK {
    background: linear-gradient(135deg, #FFFFF0, #FEFCBF);
    border-color: #F6E05E;
}

.task-list-item.APPROVED {
    background: linear-gradient(135deg, #F0FFF4, #C6F6D5);
    border-color: #68D391;
}

.task-list-item.REJECTED {
    background: linear-gradient(135deg, #FFF5F5, #FED7D7);
    border-color: #FC8181;
}

.task-list-item.skipped {
    background: linear-gradient(135deg, #F7FAFC, #EDF2F7);
    border-color: #CBD5E0;
}

.task-list-info {
    flex: 1;
    min-width: 0;
}

.task-list-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 6px;
    color: var(--text-main);
}

.task-list-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.task-list-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.task-list-amount {
    font-weight: 800;
    color: #276749;
    font-size: 1rem;
    background: linear-gradient(135deg, #E6FFFA, #C6F6D5);
    padding: 6px 14px;
    border-radius: var(--radius-full);
}

.status-badge {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.status-badge.TOCHECK {
    background: linear-gradient(135deg, #FEFCBF, #FAF089);
    color: #975A16;
}

.status-badge.APPROVED {
    background: linear-gradient(135deg, #C6F6D5, #9AE6B4);
    color: #276749;
}

.status-badge.REJECTED {
    background: linear-gradient(135deg, #FED7D7, #FEB2B2);
    color: #C53030;
}

.screenshot-link {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    padding: 8px;
    border-radius: var(--radius-sm);
}

.screenshot-link:hover {
    color: var(--primary);
    background: var(--bg-light);
}

.screenshot-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ===== Quality Section ===== */
.quality-bar-container {
    height: 10px;
    background: #E2E8F0;
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 15px;
}

.quality-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--success) 100%);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.quality-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#quality-score {
    font-size: 1.4rem;
    font-weight: 800;
}

.user-level {
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.user-level.junior {
    background: #E2E8F0;
    color: var(--text-muted);
}

.user-level.standard {
    background: linear-gradient(135deg, #E8F0FE, #D4E4FC);
    color: var(--primary);
}

.user-level.trusted {
    background: linear-gradient(135deg, #C6F6D5, #9AE6B4);
    color: #276749;
}

/* ===== Stats Breakdown ===== */
.stats-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
}

.info-label {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
}

.info-value {
    color: var(--text-main);
    font-weight: 700;
    font-size: 1rem;
}

/* ===== Contract Styles ===== */
.section-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.contract-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contract-form .form-group {
    margin-bottom: 0;
}

.contract-form input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E2E8F0;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.contract-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(66, 103, 178, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Contract Status */
.contract-status-card {
    margin-bottom: 20px;
}

.status-box {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px;
    border-radius: var(--radius);
}

.status-box.pending {
    background: linear-gradient(135deg, #FFFFF0, #FEFCBF);
    border: 2px solid #F6E05E;
}

.status-box.approved {
    background: linear-gradient(135deg, #F0FFF4, #C6F6D5);
    border: 2px solid #68D391;
}

.status-box.rejected {
    background: linear-gradient(135deg, #FFF5F5, #FED7D7);
    border: 2px solid #FC8181;
}

.status-icon {
    font-size: 2rem;
}

.status-box.pending .status-icon {
    color: #D69E2E;
}

.status-box.approved .status-icon {
    color: var(--success);
}

.status-box.rejected .status-icon {
    color: var(--danger);
}

.status-text strong {
    display: block;
    margin-bottom: 4px;
    font-size: 1.1rem;
}

.status-text p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* Upload Contract Area */
.upload-contract-area {
    margin-bottom: 20px;
}

.signed-contract-preview {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    margin-top: 14px;
    border: 2px solid #E2E8F0;
}

.signed-files-list {
    flex: 1;
    max-height: 150px;
    overflow-y: auto;
}

.signed-file-item {
    font-size: 0.95rem;
    color: var(--text-main);
    padding: 6px 0;
    border-bottom: 1px solid #E2E8F0;
    font-weight: 600;
}

.signed-file-item:last-child {
    border-bottom: none;
}

#signed-file-name {
    font-size: 0.95rem;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.signed-contract-preview .remove-btn {
    position: static;
    align-self: flex-end;
    width: auto;
    height: auto;
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: var(--radius-full);
}

.uploaded-link {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #F0FFF4, #C6F6D5);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    color: #276749;
    font-weight: 700;
}

.uploaded-link a {
    color: var(--primary);
    font-weight: 700;
}

#uploaded-files-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#uploaded-files-links a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

#uploaded-files-links a:hover {
    text-decoration: underline;
}

/* ===== Toast Messages ===== */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-hover);
    animation: slideIn 0.3s ease;
    max-width: 360px;
    font-size: 0.95rem;
    font-weight: 700;
}

.toast.success {
    background: linear-gradient(135deg, var(--success), #38A169);
    color: var(--white);
}

.toast.error {
    background: linear-gradient(135deg, var(--danger), #E53E3E);
    color: var(--white);
}

.toast.warning {
    background: linear-gradient(135deg, var(--warning), #D69E2E);
    color: var(--text-main);
}

.toast.info {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .sidebar {
        width: 260px;
    }
    
    .main-content {
        margin-left: 260px;
        padding: 30px;
        max-width: calc(100vw - 260px);
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .task-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .task-list-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .stats-breakdown-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .filter-buttons {
        width: 100%;
    }
    
    .filter-btn {
        flex: 1;
        text-align: center;
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .task-card {
        max-width: 100%;
    }
    
    .task-card-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .task-card-footer {
        flex-direction: column;
    }
    
    .task-card-footer .btn {
        width: 100%;
    }
    
    .card {
        padding: 20px;
    }
    
    .user-info {
        display: none;
    }
}

@media (max-width: 480px) {
    .header-inner {
        padding: 10px 15px;
    }
    
    .logo img {
        height: 32px;
    }
    
    .logo-title {
        font-size: 0.9rem;
    }
    
    .logo-subtitle {
        display: none;
    }
    
    .login-btn {
        padding: 8px 12px;
    }
    
    .login-btn-text {
        display: none;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .page-title {
        font-size: 1.3rem;
    }
    
    .stat-card {
        padding: 18px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
    }
    
    .stat-info h3 {
        font-size: 1.4rem;
    }
    
    .auth-box {
        padding: 30px 20px;
    }
}

/* ===== Focus States ===== */
button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ===== Selection ===== */
::selection {
    background: rgba(66, 103, 178, 0.15);
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: #CBD5E0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== Dialog Overlay ===== */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.dialog-overlay.hidden {
    display: none;
}

.dialog-box {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease;
}

.dialog-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.dialog-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.dialog-message {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 24px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Contract empty field highlight */
.contract-form input.field-missing {
    background-color: #FEF2F2;
    border-color: #FCA5A5;
}

.contract-form input.field-missing:focus {
    background-color: #fff;
    border-color: var(--primary);
}
