@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Brand Colors - Indigo & Slate Theme */
    --primary: #4f46e5;       /* Indigo 600 */
    --primary-hover: #4338ca; /* Indigo 700 */
    --primary-light: #e0e7ff; /* Indigo 100 */
    --secondary: #64748b;     /* Slate 500 */
    --success: #10b981;       /* Emerald 500 */
    --info: #3b82f6;          /* Blue 500 */
    --warning: #f59e0b;       /* Amber 500 */
    --danger: #ef4444;        /* Red 500 */
    --light: #f8fafc;         /* Slate 50 */
    --dark: #1e293b;          /* Slate 800 */

    /* Backgrounds */
    --bg-body: #f1f5f9;       /* Slate 100 */
    --bg-card: #ffffff;
    --bg-sidebar: #0f172a;    /* Slate 900 */
    
    /* Text */
    --text-main: #0f172a;     /* Slate 900 */
    --text-muted: #64748b;    /* Slate 500 */
    --text-light: #cbd5e1;    /* Slate 300 */

    /* UI Elements */
    --border-color: #e2e8f0;  /* Slate 200 */
    --border-radius: 0.75rem; /* 12px */
    --border-radius-sm: 0.375rem;
    --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 -2px rgb(0 0 0 / 0.1);
    
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Global Reset & Typography */
body {
    font-family: var(--font-family);
    background-color: var(--bg-body);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 0.925rem;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    font-weight: 600;
    letter-spacing: -0.025em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

/* Layout Overrides */
.wrapper, .content-wrapper {
    background-color: var(--bg-body) !important;
}

/* Navbar */
.main-header {
    background-color: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color) !important;
    box-shadow: none !important;
    height: 3.5rem;
}

.main-header .nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    height: 3.5rem;
    display: flex;
    align-items: center;
}

.main-header .nav-link:hover {
    color: var(--primary) !important;
    background-color: transparent !important;
}

/* Sidebar */
.main-sidebar {
    background-color: var(--bg-sidebar) !important;
    box-shadow: 1px 0 0 var(--border-color);
    border-right: none;
}

.brand-link {
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    height: 3.5rem;
    display: flex;
    align-items: center;
    background-color: var(--bg-sidebar) !important;
}

.brand-text {
    font-weight: 700 !important;
    color: white !important;
    letter-spacing: 0.5px;
}

.sidebar {
    padding-top: 1rem;
}

.nav-sidebar .nav-item {
    margin-bottom: 0.25rem;
}

.nav-sidebar .nav-link {
    border-radius: var(--border-radius-sm) !important;
    color: var(--text-light) !important;
    padding: 0.75rem 1rem;
    font-weight: 500;
}

.nav-sidebar .nav-link:hover {
    background-color: rgba(255,255,255,0.1) !important;
    color: white !important;
}

.nav-sidebar .nav-link.active {
    background-color: var(--primary) !important;
    color: white !important;
    box-shadow: var(--shadow-md) !important;
}

.nav-sidebar .nav-icon {
    font-size: 1rem;
    margin-right: 0.75rem;
    width: 1.25rem;
    text-align: center;
}

.nav-treeview {
    padding-left: 1rem;
    background: transparent !important;
}

/* Content Header */
.content-header {
    padding: 1.5rem 0.5rem;
}

.content-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Cards */
.card {
    background-color: var(--bg-card);
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

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

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header .card-tools {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    text-align: right;
}

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

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background-color: transparent;
    border-top: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 1rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition);
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: white;
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: var(--light);
    border-color: var(--text-muted);
    color: var(--text-main);
}

.btn-tool {
    color: var(--text-muted);
}

/* Forms */
.form-control {
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    color: var(--text-main);
    background-color: white;
    transition: var(--transition);
    height: auto;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.input-group-text {
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--light);
    color: var(--text-muted);
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: var(--light);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 0.75rem 1.5rem;
    border-top: none;
}

.table td {
    padding: 1rem 1.5rem;
    vertical-align: middle;
    border-top: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 0.875rem;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(248, 250, 252, 0.5);
}

.table-hover tbody tr:hover {
    background-color: rgba(241, 245, 249, 0.8);
}

/* Dashboard Widgets (Small Box) */
.small-box {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    background-color: white !important; /* Override colors to white */
    color: var(--text-main) !important;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
}

.small-box .inner {
    padding: 1.5rem;
}

.small-box h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.small-box p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.small-box .icon {
    color: var(--primary);
    opacity: 0.1;
    font-size: 4rem;
    top: 1rem;
    right: 1rem;
}

/* Custom coloring for dashboard widgets via pseudo-elements or specific classes if needed */
.small-box.bg-info h3 { color: var(--info); }
.small-box.bg-success h3 { color: var(--success); }
.small-box.bg-warning h3 { color: var(--warning); }
.small-box.bg-danger h3 { color: var(--danger); }

.small-box .small-box-footer {
    background-color: var(--light) !important;
    color: #000 !important;
    padding: 0.75rem;
    font-weight: 500;
    font-size: 0.8rem;
    border-top: 1px solid var(--border-color);
}

.small-box .small-box-footer:hover {
    background-color: #f1f5f9 !important;
    color: #000 !important;
}

/* Login Page - MZF PAY Tech Redesign */
.login-page {
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    font-family: 'Inter', sans-serif;
}

.bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 40px #fff;
    animation: animateStar 10s linear infinite;
}

.star::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    height: 1px;
    background: linear-gradient(90deg, #fff, transparent);
}

.star:nth-child(1) { top: 0; right: 0; left: initial; animation-duration: 3s; animation-delay: 0.2s; }
.star:nth-child(2) { top: 0; right: 80px; left: initial; animation-duration: 5s; animation-delay: 0.4s; }
.star:nth-child(3) { top: 80px; right: 0px; left: initial; animation-duration: 4s; animation-delay: 0.6s; }
.star:nth-child(4) { top: 0; right: 180px; left: initial; animation-duration: 3.5s; animation-delay: 0.8s; }
.star:nth-child(5) { top: 0; right: 400px; left: initial; animation-duration: 4.5s; animation-delay: 1s; }
.star:nth-child(6) { top: 0; right: 600px; left: initial; animation-duration: 5s; animation-delay: 1.2s; }
.star:nth-child(7) { top: 300px; right: 0px; left: initial; animation-duration: 3.8s; animation-delay: 1.4s; }
.star:nth-child(8) { top: 0px; right: 700px; left: initial; animation-duration: 4.2s; animation-delay: 1.6s; }
.star:nth-child(9) { top: 0px; right: 1000px; left: initial; animation-duration: 5.5s; animation-delay: 1.8s; }
.star:nth-child(10) { top: 0px; right: 450px; left: initial; animation-duration: 3.2s; animation-delay: 2s; }

@keyframes animateStar {
    0% {
        transform: rotate(315deg) translateX(0);
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        transform: rotate(315deg) translateX(-1500px);
        opacity: 0;
    }
}

.login-box {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 400px;
    padding: 0;
}

.login-logo {
    margin-bottom: 2rem;
    text-align: center;
}

.login-logo h1 {
    text-shadow: 0 0 10px rgba(79, 70, 229, 0.8);
}

.glass-card {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    border-radius: 20px !important;
    overflow: hidden;
}

.login-card-body {
    background: transparent !important;
    padding: 2.5rem !important;
}

.login-box-msg {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Custom Inputs - Dark Theme */
.login-input-group {
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.35rem 0.5rem;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem !important;
}

.login-input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.3);
    background: rgba(0, 0, 0, 0.5);
}

.login-input-group .form-control {
    background: transparent;
    border: none;
    color: white;
    height: 42px;
    padding-left: 1rem;
}

.login-input-group .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.login-input-group .form-control:focus {
    box-shadow: none;
    background: transparent;
}

.login-input-group .input-group-text {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 0 0.75rem;
}

.login-input-group:focus-within .input-group-text {
    color: var(--primary);
}

/* Login Button - Neon Glow */
.btn-login {
    border-radius: 50px;
    height: 48px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: linear-gradient(90deg, #0ea5e9, #3b82f6);
    border: none;
    color: white;
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.4);
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn-login:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.6);
    background: linear-gradient(90deg, #0284c7, #2563eb);
}

.btn-login:active {
    transform: translateY(0);
}

/* Captcha Styling */
#geetest-captcha {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
}

#geetest-status {
    text-align: center;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Utilities */
.text-muted { color: var(--text-muted) !important; }
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }

/* Status Badges */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 600;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    letter-spacing: 0.025em;
}

.badge-success { background-color: #dcfce7; color: #166534; }
.badge-warning { background-color: #fef3c7; color: #92400e; }
.badge-danger { background-color: #fee2e2; color: #991b1b; }
.badge-info { background-color: #e0f2fe; color: #075985; }
.badge-secondary { background-color: #f1f5f9; color: #475569; }

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
