:root {
    --bg-dark: #0f172a;
    --panel-bg: rgba(30, 41, 59, 0.7);
    --panel-border: #334155;
    --cyan: #0ea5e9;
    --purple: #8b5cf6;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --input-bg: rgba(15, 23, 42, 0.6);
    --input-border: #475569;
    --preview-bg: #0f172a;
    --preview-img-bg: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    --preview-content-bg: #1e293b;
}

body.light-theme {
    --bg-dark: #f8fafc;
    --panel-bg: rgba(255, 255, 255, 0.85);
    --panel-border: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --input-bg: rgba(241, 245, 249, 0.8);
    --input-border: #cbd5e1;
    --preview-bg: #ffffff;
    --preview-img-bg: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
    --preview-content-bg: #f8fafc;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    /* Subtle grid background */
    background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 20px 20px;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.app-container {
    width: 100%;
    max-width: 950px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    background: rgba(14, 165, 233, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(14, 165, 233, 0.3);
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.2) inset, 0 0 20px rgba(14, 165, 233, 0.1);
    position: relative;
    overflow: hidden;
}

.logo-icon-wrapper::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, rgba(14, 165, 233, 0.3), transparent 30%);
    animation: rotate 4s linear infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes electricLightning {
    0%, 92%, 98%, 100% {
        color: var(--cyan);
        text-shadow: 0 0 10px var(--cyan);
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    93% {
        color: #ffffff;
        text-shadow: 0 0 20px #ffffff, 0 0 40px var(--cyan);
        transform: scale(1.1) rotate(-5deg);
        opacity: 1;
    }
    95% {
        color: var(--cyan);
        text-shadow: none;
        transform: scale(0.9) rotate(0deg);
        opacity: 0.3;
    }
    96% {
        color: #ffffff;
        text-shadow: 0 0 30px #ffffff, 0 0 60px var(--cyan);
        transform: scale(1.2) rotate(5deg);
        opacity: 1;
    }
}

.logo-icon {
    font-size: 22px;
    color: var(--cyan);
    text-shadow: 0 0 10px var(--cyan);
    display: inline-block;
    animation: electricLightning 2s infinite;
    position: relative;
    z-index: 1;
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.nge {
    font-size: 18px;
    font-weight: 900;
    font-style: italic;
    letter-spacing: 1px;
}

.gradient-text {
    background: linear-gradient(90deg, #fff 0%, var(--cyan) 50%, var(--purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 8px rgba(14, 165, 233, 0.3));
    padding-right: 4px; /* Prevent italic 'P' from clipping */
}

.logo-subtitle {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 2px;
    font-weight: 700;
    text-transform: uppercase;
}

.riyoyoan {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    font-weight: 700;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 36px;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

/* Tabs */
.tabs-container {
    display: flex;
    gap: 15px;
}

.tab {
    flex: 1;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    color: var(--text-muted);
    padding: 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.tab.active {
    background: rgba(0, 229, 255, 0.05);
    border-color: rgba(0, 229, 255, 0.3);
    color: var(--cyan);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.1) inset;
}

/* Dashed Divider */
.dashed-divider-light {
    border: none;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
    width: 100%;
    margin: 0;
}
body.light-theme .dashed-divider-light {
    border-top: 1px dashed rgba(0, 0, 0, 0.15);
}

/* Main Content */
.inner-content {
    display: flex;
    padding-top: 20px;
}

.inner-left {
    flex: 1.3;
    padding-right: 25px;
}

.vertical-divider {
    width: 1px;
    border-left: 1px dashed rgba(255, 255, 255, 0.15);
}
body.light-theme .vertical-divider {
    border-left: 1px dashed rgba(0, 0, 0, 0.15);
}

.inner-right {
    flex: 1.1;
    padding-left: 25px;
}

.panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

/* Add a subtle glow at the top of panels */
.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.panel-header i {
    font-size: 20px;
}

@keyframes heartbeatPulse {
    0% { transform: scale(1); opacity: 1; text-shadow: 0 0 10px var(--purple); }
    15% { transform: scale(1.3); opacity: 0.7; text-shadow: 0 0 15px var(--purple); }
    30% { transform: scale(1); opacity: 1; text-shadow: 0 0 10px var(--purple); }
    45% { transform: scale(1.3); opacity: 0.7; text-shadow: 0 0 15px var(--purple); }
    60% { transform: scale(1); opacity: 1; text-shadow: 0 0 10px var(--purple); }
    100% { transform: scale(1); opacity: 1; text-shadow: 0 0 10px var(--purple); }
}

.panel-header i.ph-record {
    animation: heartbeatPulse 1.5s infinite ease-in-out;
    transform-origin: center;
}

.panel-header h2 {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.neon-cyan { color: var(--cyan); text-shadow: 0 0 8px var(--cyan); }
.neon-purple { color: var(--purple); text-shadow: 0 0 8px var(--purple); }

/* Removed Light Theme Contrast Overrides based on user request */

body.light-theme .styled-input:focus, 
body.light-theme .styled-textarea:focus, 
body.light-theme .styled-select:focus {
    background: #ffffff;
    border-color: #0066cc;
    box-shadow: 0 0 10px rgba(0, 102, 204, 0.2);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.row-group {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.row-inputs {
    display: flex;
    gap: 15px;
}

.flex-2 { flex: 2; }
.flex-1 { flex: 1; }

.badge-btn {
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid var(--cyan);
    color: var(--cyan);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.1);
}

.styled-select, .styled-input, .styled-textarea {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-main);
    padding: 12px 15px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    transition: all 0.3s ease;
    outline: none;
}

.styled-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2394a3b8%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: 12px auto;
    padding-right: 40px;
}

body.light-theme .styled-select {
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2364748b%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
}

/* Custom Arrows/Spinners from Number Inputs */
input[type="number"] {
    color-scheme: dark;
}
body.light-theme input[type="number"] {
    color-scheme: light;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: inner-spin-button;
    opacity: 0.8;
    cursor: pointer;
    background: transparent;
}
input[type="number"]::-webkit-inner-spin-button:hover {
    opacity: 1;
}

.styled-select option {
    background-color: #121520; /* Harus solid hex, browser menolak warna transparan/rgba untuk dropdown */
    color: #ffffff;
}

body.light-theme .styled-select option {
    background-color: #ffffff;
    color: #1a1a2e;
}

.styled-input:focus, .styled-textarea:focus, .styled-select:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
    background: rgba(10, 12, 19, 0.8);
}

.select-group {
    position: relative;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    padding: 4px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.select-group .domain-icon {
    color: var(--text-muted);
    font-size: 16px;
}

.select-group .select-label {
    margin-bottom: 0;
}

.select-group .styled-select {
    border: none;
    background: transparent;
    padding: 8px 0;
    flex: 1;
}

.styled-textarea {
    height: 90px;
    resize: none;
    line-height: 1.5;
}

.toggle-group {
    display: flex;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    padding: 4px;
}

.toggle-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.toggle-btn.active {
    background: var(--cyan);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.bottom-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    align-items: stretch;
}

.f-sub-btn {
    background: transparent;
    border: 1px solid var(--cyan);
    color: var(--text-main);
    padding: 0 15px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.15) inset;
    cursor: pointer;
    white-space: nowrap;
}

.cyan-text { 
    color: var(--cyan); 
    display: inline-block;
    width: 26px;
    text-align: left;
}

.generate-btn {
    flex: 1;
    background: var(--cyan);
    border: none;
    color: #ffffff;
    border-radius: 12px;
    padding: 12px 15px;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
}

.generate-btn:hover {
    transform: translateY(-2px);
}

.generate-btn i {
    font-size: 24px;
}

.input-with-icon {
    display: flex;
    gap: 10px;
}

.icon-btn-small {
    background: var(--cyan);
    border: none;
    color: #ffffff;
    width: 42px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.icon-btn-small:hover {
    background: #0284c7;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.5);
}

/* Live Preview Card */
.live-preview-card {
    background: var(--preview-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--panel-border);
}

.preview-image-area {
    aspect-ratio: 1.91 / 1;
    background: var(--preview-img-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Result Box Header Styles */
.result-header {
    background: rgba(255, 255, 255, 0.05);
}
.result-title {
    color: var(--text-muted);
}
body.light-theme .result-header {
    background: #1e293b; /* Navy Dark Slate */
}
body.light-theme .result-title {
    color: #f8fafc; /* White text on navy background */
}

.preview-content {
    padding: 15px;
    background: var(--preview-content-bg);
}

.preview-domain {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 5px;
    font-weight: 700;
}

.preview-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 5px;
}

.preview-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* Custom Scrollbars for Textareas */
textarea::-webkit-scrollbar {
    width: 6px;
}
textarea::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 8px;
}
textarea::-webkit-scrollbar-thumb {
    background: var(--input-border);
    border-radius: 10px;
}
textarea::-webkit-scrollbar-thumb:hover {
    background: var(--cyan);
}


/* Custom Animated Dropdown */
.custom-select-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    user-select: none;
    flex: 1;
    min-width: 0;
}

.custom-select-trigger {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-main);
    padding: 0 15px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    width: 100%;
    height: 100%;
    min-height: 42px;
    box-sizing: border-box;
    min-width: 0;
}

.custom-select-wrapper.open .custom-select-trigger {
    border-color: var(--cyan);
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.2);
}

.custom-select-trigger span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 10px;
    flex: 1;
}

.custom-select-trigger i {
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.custom-select-wrapper.open .custom-select-trigger i {
    transform: rotate(180deg);
    color: var(--cyan);
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: var(--panel-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 146px; /* Exactly enough for 4 items */
    overflow-y: auto;
}

#mode-select-wrapper .custom-select-options {
    max-height: none;
}

.custom-select-wrapper.open .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Scrollbar for Dropdown Options */
.custom-select-options::-webkit-scrollbar {
    width: 6px;
}
.custom-select-options::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 8px;
}
.custom-select-options::-webkit-scrollbar-thumb {
    background: var(--input-border);
    border-radius: 10px;
}
.custom-select-options::-webkit-scrollbar-thumb:hover {
    background: var(--cyan);
}

.custom-select-option {
    padding: 10px 15px;
    font-size: 13px;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

body.light-theme .custom-select-option {
    border-bottom: 1px dashed rgba(0, 0, 0, 0.05);
}

.custom-select-option:last-child {
    border-bottom: none;
}

.custom-select-option:hover, .custom-select-option.selected {
    background: rgba(14, 165, 233, 0.1);
    color: var(--cyan);
}

/* Custom Toggle */
#landing-toggle-btn {
    transition: all 0.3s ease;
}

#landing-toggle-btn.active {
    border-color: var(--cyan);
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.2) inset;
    background: rgba(14, 165, 233, 0.05);
}

#landing-toggle-btn.active #landing-toggle-text {
    color: var(--cyan);
}

.custom-toggle {
    position: relative;
    width: 36px;
    height: 20px;
}

.toggle-track {
    width: 100%;
    height: 100%;
    background-color: var(--input-border);
    border-radius: 20px;
    position: relative;
    transition: background-color 0.3s ease;
}

.toggle-thumb {
    width: 14px;
    height: 14px;
    background-color: #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#landing-toggle-btn.active .toggle-track {
    background-color: var(--cyan);
}

#landing-toggle-btn.active .toggle-thumb {
    transform: translateX(16px);
}

/* Navigation Tabs in Header */
.nav-tabs {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 4px;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

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

.nav-btn.active {
    background: rgba(14, 165, 233, 0.1);
    color: var(--cyan);
    box-shadow: 0 2px 10px rgba(14, 165, 233, 0.2);
}

/* Dashboard Stats Cards */
.stat-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
}

.cyan-icon { background: rgba(14, 165, 233, 0.1); color: var(--cyan); border: 1px solid rgba(14, 165, 233, 0.2); }
.purple-icon { background: rgba(139, 92, 246, 0.1); color: var(--purple); border: 1px solid rgba(139, 92, 246, 0.2); }
.green-icon { background: rgba(34, 197, 94, 0.1); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.2); }
.orange-icon { background: rgba(249, 115, 22, 0.1); color: #f97316; border: 1px solid rgba(249, 115, 22, 0.2); }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 18px;
    font-weight: 900;
    color: var(--text-main);
}

/* Recent Leads List */
.leads-list::-webkit-scrollbar {
    width: 4px;
}
.leads-list::-webkit-scrollbar-thumb {
    background: var(--input-border);
    border-radius: 4px;
}

.lead-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
    font-size: 12px;
}
.lead-item:last-child {
    border-bottom: none;
}
.lead-country { width: 40px; }
.lead-offer { flex: 1; font-weight: 600; color: var(--text-main); }
.lead-amount { font-weight: 800; margin-right: 15px; }
.lead-time { color: var(--text-muted); font-size: 10px; width: 60px; text-align: right; }

/* Sidebar & Full App Layout */
body {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.dashboard-layout {
    width: 100vw;
    height: 100vh;
    display: grid;
    grid-template-columns: 240px 1fr;
    background: var(--bg-color);
}

.sidebar {
    background: transparent;
    border-right: 1px solid var(--panel-border);
    display: flex;
    flex-direction: column;
    padding: 25px 20px;
    z-index: 100;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-item {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
}

.sidebar-item i {
    font-size: 18px;
    opacity: 0.8;
}

.sidebar-item:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}

.sidebar-item.active {
    color: var(--cyan);
    background: rgba(14, 165, 233, 0.1);
}

.sidebar-item.active i {
    color: var(--cyan);
    opacity: 1;
    text-shadow: 0 0 10px rgba(14, 165, 233, 0.5);
}

.sidebar-divider {
    border: none;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    margin: 15px 0;
    width: 100%;
}

body.light-theme .sidebar-divider {
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
}

.sidebar-title {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 10px;
    padding-left: 15px;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
}

.sidebar-logout {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 12px;
    width: 100%;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
}

.sidebar-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.5);
}

.main-content-area {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    background: var(--bg-color);
}

.top-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--panel-border);
    background: var(--bg-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
}

.content-wrapper {
    padding: 30px;
    flex: 1;
}

/* Sidebar Collapse */
.sidebar {
    transition: width 0.3s ease, padding 0.3s ease;
    overflow: hidden;
    width: 240px;
}

.dashboard-layout {
    grid-template-columns: 240px 1fr;
    transition: grid-template-columns 0.3s ease;
}

.dashboard-layout.collapsed {
    grid-template-columns: 60px 1fr;
}

.dashboard-layout.collapsed .sidebar {
    width: 60px;
    padding: 25px 10px;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.dashboard-layout.collapsed .sidebar-logo-text,
.dashboard-layout.collapsed .sidebar-brand-text,
.dashboard-layout.collapsed .sidebar-item span,
.dashboard-layout.collapsed .sidebar-title,
.dashboard-layout.collapsed .sidebar-logout span {
    display: none !important;
}

.dashboard-layout.collapsed .sidebar-item {
    justify-content: center;
    padding: 12px;
}

.dashboard-layout.collapsed .sidebar-item i {
    margin: 0;
    font-size: 20px;
}

.dashboard-layout.collapsed .sidebar-logo {
    justify-content: center;
}

.dashboard-layout.collapsed .sidebar-logout {
    padding: 12px;
    justify-content: center;
}

.dashboard-layout.collapsed .sidebar-logout i {
    margin: 0;
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.data-table thead th {
    text-align: left;
    padding: 12px 15px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--panel-border);
    white-space: nowrap;
}

.data-table thead th i {
    font-size: 10px;
    margin-left: 4px;
    opacity: 0.5;
}

.data-table tbody td {
    padding: 12px 15px;
    color: var(--text-main);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    white-space: nowrap;
}

body.light-theme .data-table tbody td {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

body.light-theme .data-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* Date Range Toggle Buttons */
.date-btn {
    background: var(--input-bg);
    color: var(--text-muted);
    border: 1px solid var(--input-border);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 6px 12px;
    border-radius: 6px;
}

.date-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.date-btn.active {
    background: var(--cyan);
    color: #fff;
    border-color: var(--cyan);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

/* Force DD/MM/YYYY format for date inputs */
input[type="date"] {
    position: relative;
    color: transparent !important;
}
input[type="date"]::-webkit-datetime-edit {
    color: transparent !important;
}
input[type="date"]::before {
    content: attr(data-date);
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-main);
    pointer-events: none;
    font-size: 13px;
    font-family: inherit;
}
body.light-theme input[type="date"]::before {
    color: #1a1a2e;
}
