/* HiepSi2D - Premium Light Luxury Theme */
@font-face {
    font-family: 'Oswald';
    src: url('/fonts/Oswald/Oswald-VariableFont_wght.ttf') format('truetype');
    font-weight: 200 700;
    font-style: normal;
    font-display: swap;
}

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Palette: Royal Light */
    --bg-body: #f8fafc;
    /* Slate 50 */
    --bg-surface: #ffffff;
    /* White */
    --bg-surface-glass: rgba(255, 255, 255, 0.9);

    --primary: #b45309;
    /* Amber 700 (Bronze/Gold) */
    --primary-light: #fbbf24;
    /* Amber 400 */
    --primary-glow: rgba(180, 83, 9, 0.15);

    --secondary: #e11d48;
    /* Rose 600 */

    --text-main: #0f172a;
    /* Slate 900 (Deep Navy) */
    --text-muted: #64748b;
    /* Slate 500 */

    --border: #e2e8f0;
    /* Slate 200 */
    --border-hover: #b45309;
    /* Primary */

    --font-head: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Reset & Base */
html {
    height: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    background-image:
        radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 0) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 0) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 0) 0, transparent 50%);
    min-height: 100%;
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1 0 auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-head);
    letter-spacing: 0.5px;
    color: var(--text-main);
    margin-bottom: 1rem;
    font-weight: 700;
}

a {
    transition: all 0.2s ease;
    text-decoration: none !important;
}

/* Utilities */
[x-cloak] {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(180, 83, 9, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(180, 83, 9, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(180, 83, 9, 0);
    }
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-brand {
    font-size: 1.8rem;
    font-family: var(--font-head);
    color: var(--primary) !important;
    font-weight: 700;
    text-transform: uppercase;
    text-shadow: none;
    letter-spacing: 1px;
}

.nav-brand span {
    color: var(--text-main);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary) !important;
    background: rgba(180, 83, 9, 0.05);
}

/* Cards */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 1.5rem;
    font-weight: 700;
}

.card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn {
    border-radius: 6px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 6px -1px rgba(180, 83, 9, 0.3);
}

.btn-primary:hover {
    background: #92400e;
    /* Amber 800 */
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(180, 83, 9, 0.4);
    color: #fff;
}

.btn-secondary {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: #f1f5f9;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-danger {
    color: var(--secondary);
    border: 1px solid var(--secondary);
    background: transparent;
}

.btn-outline-danger:hover {
    background: var(--secondary);
    color: #fff;
}

.btn-success {
    background: #10b981;
    color: #fff;
}

.btn-success:hover {
    background: #059669;
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Forms */
.form-control {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text-main);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    transition: all 0.2s;
}

.form-control:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.1);
    color: var(--text-main);
}

/* Table */
.table {
    color: var(--text-main);
}

.table th {
    border-top: none;
    border-bottom: 2px solid var(--border);
    font-family: var(--font-head);
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.table td {
    border-top: 1px solid var(--border);
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: #f8fafc;
}

/* Text Colors override */
.text-muted {
    color: var(--text-muted) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.text-danger {
    color: var(--secondary) !important;
}

.text-white {
    color: #fff !important;
}

/* Keep absolute white for specific dark containers */

/* Auth Pages (Login, Register, Forgot Password) */
.auth-wrapper {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 440px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-family: var(--font-head);
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

.auth-card .card {
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-main);
    background: #fff;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.1);
}

.form-input::placeholder {
    color: #94a3b8;
}

.btn-block {
    width: 100%;
    padding: 0.9rem 1.5rem;
}

/* Text Utilities */
.text-sm {
    font-size: 0.875rem;
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1.5rem;
}

/* Auth Modal */
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

.auth-modal {
    background: var(--bg-surface);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border: none;
    background: #f1f5f9;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s;
}

.auth-modal-close:hover {
    background: #e2e8f0;
    color: var(--text-main);
}

.auth-modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-modal-title {
    font-family: var(--font-head);
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.auth-modal-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.auth-modal-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.auth-modal-footer p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.link-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
}

.link-btn:hover {
    text-decoration: underline;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-danger {
    background: rgba(225, 29, 72, 0.1);
    border: 1px solid #e11d48;
    color: #be123c;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid #22c55e;
    color: #16a34a;
}

.error-message {
    color: #e11d48;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    margin-bottom: 0;
}

/* Footer */
.footer {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #cbd5e1;
    padding: 3rem 0 0;
    margin-top: auto;
    border-top: 3px solid var(--primary);
    font-size: 0.9rem;
}

.footer-main {
    display: grid;
    grid-template-columns: 1.5fr 2fr 1fr;
    gap: 3rem;
    padding-bottom: 2rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
}

.footer-logo {
    font-size: 1.8rem;
    font-family: var(--font-head);
    color: var(--primary) !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    display: inline-block;
}

.footer-logo span {
    color: #fff;
}

.footer-desc {
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.footer h5 {
    color: #f8fafc;
    font-weight: 700;
    margin-bottom: 1.25rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer h5::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background: var(--primary);
}

.footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 0.6rem;
}

.footer-column ul li a {
    color: #94a3b8;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.footer-column ul li a i {
    font-size: 0.65rem;
    color: var(--primary);
    transition: transform 0.2s;
}

.footer-column ul li a:hover {
    color: #fff;
}

.footer-column ul li a:hover i {
    transform: translateX(3px);
}

.footer-status h5::after {
    display: none;
}

.footer-status h5 {
    border-bottom: 2px solid var(--primary);
    display: inline-block;
    padding-bottom: 0.4rem;
    margin-bottom: 1rem;
}

.status-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.status-item:last-child {
    border-bottom: none;
}

.status-label {
    color: #64748b;
    font-size: 0.85rem;
}

.status-value {
    font-weight: 600;
    color: #fff;
}

.status-value.online {
    color: var(--primary-light);
}

.status-value.stable {
    color: #22c55e;
}

.status-value.stable i {
    font-size: 0.5rem;
    margin-right: 0.4rem;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
}

.social-links a {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.social-links a:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(180, 83, 9, 0.4);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 1rem;
}

.footer-bottom .copyright {
    color: #64748b;
    margin: 0;
    font-size: 0.85rem;
}

.footer-bottom .warning {
    color: #475569;
    margin: 0;
    font-size: 0.8rem;
}

.footer-bottom .warning i {
    color: var(--primary);
    margin-right: 0.4rem;
}

/* Footer Responsive */
@media (max-width: 992px) {
    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer-status {
        grid-column: span 2;
    }

    .status-card {
        display: flex;
        justify-content: space-around;
    }

    .status-item {
        flex-direction: column;
        text-align: center;
        border-bottom: none;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 768px) {
    .footer-main {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-links {
        grid-template-columns: 1fr 1fr;
    }

    .footer-status {
        grid-column: span 1;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .status-card {
        flex-direction: column;
    }

    .status-item {
        flex-direction: row;
        justify-content: space-between;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
}