/* --- Global Theme --- */

body.bds-dark, .bds-premium-shell.bds-dark {
    --bg: #0e0e0e;
    --bg-soft: #1a1a1a;
    --surface: #171717;
    --text: #fff;
    --accent: #3affb3;
    --accent-soft: #208f62;
}

body:not(.bds-dark), .bds-premium-shell:not(.bds-dark) {
    --bg: #f6f6f9;
    --bg-soft: #ffffff;
    --surface: #ffffff;
    --text: #111827;
    --accent: #0f62fe;
    --accent-soft: #0043b8;
}

.bds-premium-shell {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    font-family: "Inter", sans-serif;
    display: flex;
    flex-direction: column;
}

/* --- Topbar --- */

.bds-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 25px;
    background: var(--bg-soft);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.bds-logo {
    font-size: 20px;
    font-weight: 700;
}

.bds-actions button {
    margin-left: 10px;
    padding: 8px 16px;
    background: var(--accent);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.bds-actions button:hover {
    background: var(--accent-soft);
}

/* --- Layout --- */

.bds-body {
    display: flex;
    height: calc(100vh - 70px);
}

.bds-sidebar {
    width: 240px;
    background: var(--bg-soft);
    padding: 20px;
    border-right: 1px solid rgba(255,255,255,0.08);
    overflow-y: auto;
}

.bds-sidebar button {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 8px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text);
    text-align: left;
    transition: 0.2s;
}

.bds-sidebar button:hover {
    background: var(--accent);
    color: #fff;
}

.bds-main {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    animation: fadeIn 0.3s ease-in-out;
}

/* --- Fade animation --- */

.fade-out {
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* --- Forms --- */

.bds-form {
    max-width: 500px;
    margin-bottom: 25px;
}

.bds-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.bds-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 14px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
}

.bds-form input:focus {
    outline: 2px solid var(--accent);
}

/* --- Dashboard Cards --- */

.bds-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.bds-card {
    background: var(--bg-soft);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0px 4px 12px rgba(0,0,0,0.15);
}

.bds-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.bds-card-value {
    font-size: 28px;
    font-weight: 700;
}

/* --- AI Panel --- */

.bds-ai-panel {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 380px;
    background: var(--bg-soft);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0px 8px 24px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    z-index: 9999;
}

.bds-ai-panel.hidden {
    display: none;
}

.bds-ai-panel textarea {
    width: 100%;
    height: 120px;
    padding: 12px;
    background: var(--surface);
    border-radius: 8px;
    border: none;
    color: var(--text);
}

.bds-ai-panel button {
    margin-top: 12px;
    padding: 12px;
    background: var(--accent);
    border-radius: 8px;
    color: white;
    font-weight: 600;
    border: none;
}

.bds-sidebar button.active {
    background: var(--accent);
    color: white;
}
