/* style.css - Giao diện hiện đại cho congcu.one */
:root {
    --bg-main: #0b0f19;
    --bg-card: #151d30;
    --bg-input: #0f172a;
    --border: #263352;
    --border-focus: #38bdf8;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #0ea5e9;
    --primary-hover: #0284c7;
    --primary-glow: rgba(14, 165, 233, 0.25);
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.12);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --info: #38bdf8;
    --info-bg: rgba(56, 189, 248, 0.12);
    --radius: 12px;
}

@import url('https://fonts.googleapis.com/css2?family=Ysabeau+Office:ital,wght@0,300..900;1,300..900&display=swap');

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

body, button, input, select, textarea {
    font-family: 'Ysabeau Office', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

/* Header & Navbar */
.navbar {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 14px 24px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.5px;
}

.brand-badge {
    background: linear-gradient(135deg, var(--primary), #6366f1);
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--text-main);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #2563eb);
    color: #fff;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-secondary:hover {
    border-color: var(--border-focus);
    background: #1e293b;
}

.btn-block {
    width: 100%;
}

/* Auth Cards & Layout */
.auth-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #818cf8, #34d399);
}

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

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

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

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #e2e8f0;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-wrapper .form-control {
    padding-right: 44px;
}

.form-control {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: all 0.2s ease;
    outline: none;
}

.form-control:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    margin: 0;
    border-radius: 6px;
    transition: all 0.2s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: #38bdf8;
    background: rgba(255, 255, 255, 0.08);
}

.password-toggle svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    pointer-events: none;
}

/* Checkbox & Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 0.88rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Flash Alerts */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.92rem;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid transparent;
}

.alert-success {
    background-color: var(--success-bg);
    border-color: var(--success);
    color: #6ee7b7;
}

.alert-error {
    background-color: var(--error-bg);
    border-color: var(--error);
    color: #fca5a5;
}

.alert-warning {
    background-color: var(--warning-bg);
    border-color: var(--warning);
    color: #fde047;
}

.alert-info {
    background-color: var(--info-bg);
    border-color: var(--info);
    color: #7dd3fc;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
    background: #090d16;
}

/* User Menu & Badges */
.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border-focus);
    background: #1e293b;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-active {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success);
}

.badge-inactive {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid var(--warning);
}

/* Small Buttons & Action Controls */
.btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.4;
    outline: none;
}

.btn-edit, .btn-action {
    background: #1e293b;
    color: #94a3b8;
    border: 1px solid #334155;
}

.btn-edit:hover, .btn-action:hover {
    background: #273548;
    border-color: #38bdf8;
    color: #38bdf8;
    transform: translateY(-1px);
}

.btn-danger-sm {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.btn-danger-sm:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #fca5a5;
    transform: translateY(-1px);
}

/* Result Filter Buttons */
.btn-filter {
    background: #1e293b;
    color: #94a3b8;
    border: 1px solid #334155;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-filter:hover {
    background: #273548;
    color: #e2e8f0;
    border-color: #475569;
}

.btn-filter.active {
    background: linear-gradient(135deg, var(--primary), #2563eb) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 2px 8px var(--primary-glow);
}

/* Tables & Responsiveness */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.92rem;
}

.admin-table th {
    background-color: rgba(0, 0, 0, 0.25);
    color: var(--text-muted);
    font-weight: 600;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
}

.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    vertical-align: middle;
}

.admin-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
}

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

.pagination-links {
    display: flex;
    gap: 6px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    background: #1e293b;
    border: 1px solid var(--border);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-link:hover:not(.disabled):not(.active) {
    background: #273548;
    border-color: var(--primary);
    color: #38bdf8;
}

.page-link.active {
    background: linear-gradient(135deg, var(--primary), #2563eb);
    border-color: var(--primary);
    color: #fff;
    font-weight: 700;
}

.page-link.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    color: var(--text-muted);
}
