/* =========================================
   1. THEME VARIABLES
   ========================================= */
:root {
    /* Override Bootstrap Color System */
    --bs-primary: #E6B800;
    --bs-primary-rgb: 230, 184, 0;
    --bs-body-bg: #050505;
    --bs-body-color: #ffffff;
    --bs-border-color: #333333;

    --bg-app: #050505;          /* Deepest Black */
    --bg-card: #141414;         /* Surface Gray */
    --bg-hover: #1f1f1f;        /* Hover State */
    
    --border-subtle: #333333;   /* Card Borders */
    --border-focus: #555555;
    
    --text-main: #ffffff;       /* Bright White */
    --text-muted: #888888;      /* Label Gray */
    
    --accent-gold: #E6B800;     /* PRIMARY BRAND COLOR */
    --accent-green: #2ECC71;    /* Success/Positive */
    --accent-blue: #3498db;     /* Info/Links */
}

.table-primary {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: transparent;
    --bs-table-striped-color: var(--text-main);
    --bs-table-active-bg: transparent;
    --bs-table-active-color: var(--text-main);
    --bs-table-hover-bg: var(--bg-hover);
    --bs-table-hover-color: var(--text-main);
    
    /* If you want the row to have the "Gold" text to signify primary */
    color: var(--accent-gold); 
    border-color: var(--border-subtle);
}

/* =========================================
   2. GLOBAL RESETS
   ========================================= */
html, body, main.d-flex, #wrapper {
    background-color: var(--bg-app) !important;
    color: var(--text-main);
    font-family: 'Roboto', sans-serif; /* Conserve your font choice */
}

a { color: var(--text-main); text-decoration: none; }
.text-muted { color: var(--text-muted) !important; }

/* =========================================
   3. CARD & COMPONENT STYLING
   ========================================= */
/* The "Elpriset" Card Look: Dark surface, subtle border, no shadow */
.card, 
.dashboard-card,
.rightSection { 
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    box-shadow: none; /* Flat design preferred in dark mode */
}

.card-body {
    background-color: transparent;
    padding: 1.5rem;
}

/* Headers inside cards */
h1, h2, h3, .card-title {
    color: var(--text-main);
    font-weight: 500;
}

/* =========================================
   4. UI ELEMENTS (Inputs & Buttons)
   ========================================= */
/* Inputs: Darker than card, light border */
.form-control, .form-control-lg {
    background-color: #0a0a0a; /* Darker indentation */
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    border-radius: 6px;
}

.form-control:focus {
    background-color: #0a0a0a;
    border-color: var(--accent-gold); /* Gold Focus */
    box-shadow: 0 0 0 2px rgba(230, 184, 0, 0.2);
    color: white;
}

.form-control::placeholder { color: #555; }

/* Buttons: The "Gold" Pop */
.btn-primary, .btn-submit {
    background-color: var(--accent-gold) !important;
    border: none !important;
    color: #000 !important; /* Black text on Gold for readability */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 6px;
    transition: filter 0.2s;
}

.btn-primary:hover, .btn-submit:hover {
    filter: brightness(1.1); /* Slightly brighter on hover */
    background-color: var(--accent-gold) !important;
}

/* Secondary Buttons */
.btn-outline-secondary {
    color: var(--text-muted);
    border-color: var(--border-subtle);
}
.btn-outline-secondary:hover {
    color: var(--text-main);
    background-color: var(--bg-hover);
}

/* =========================================
   5. NAVIGATION (Sidebar)
   ========================================= */
/* Specific sidebar overrides if you use .d-flex.flex-column for sidebar */
.d-flex.flex-column.flex-shrink-0 {
    background-color: #0a0a0a !important; /* Slightly lighter than body */
    border-right: 1px solid var(--border-subtle);
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 400;
    border-radius: 6px;
    margin-bottom: 4px;
}

.nav-link:hover {
    background-color: var(--bg-hover) !important;
    color: var(--text-main) !important;
}

.nav-link.active {
    background-color: rgba(230, 184, 0, 0.1) !important; /* Gold Tint */
    color: var(--accent-gold) !important;
    border: 1px solid rgba(230, 184, 0, 0.2);
}

/* =========================================
   6. TABLE STYLING (The "Clean List" Look)
   ========================================= */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-main);
    border-color: var(--border-subtle);
}

/* Header: Small, Uppercase, Gray */
.table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-subtle);
    font-weight: 500;
    padding-bottom: 1rem;
}

/* Body Rows */
.table tbody td {
    padding: 1rem 0.5rem;
    vertical-align: middle;
    border-bottom: 1px solid #222; /* Very subtle divider */
    color: var(--text-main);
}

/* Hover Effect */
.table-hover > tbody > tr:hover > * {
    background-color: var(--bg-hover) !important; 
    box-shadow: none;
}

/* Remove striped backgrounds to match the "clean" reference */
.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: transparent; 
    --bs-table-accent-bg: transparent;
}

/* =========================================
   7. UTILS & SPECIFIC FIXES
   ========================================= */
hr { border-color: var(--border-subtle); opacity: 1; }

/* Fix the login page split */
#wrapper {
    width: 100%;
    height: 100vh;
    display: flex;
    background-color: var(--bg-app);
    color: var(--text-main);
}

#wrapper .form-wrapper{
    width: 60%;
    max-width: 400px; /* Limit width for better look on large screens */
}

.form-floating {
    margin-bottom: 1.2rem;
}

.form-item.submit {
    margin: 1.5rem 0;
}

/* Google Login Button Styling */
.form-item.submit > div {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff; /* White background for Google button standard */
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0.6rem 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.form-item.submit > div:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
}

.form-item.submit > div a {
    color: #333333; /* Dark text */
    font-weight: 500;
    margin-left: 12px;
    text-decoration: none;
}

.form-item.submit > div svg {
    width: 20px;
    height: 20px;
}

/* Thinner Links */
.form-links {
    margin-top: 2rem;
    font-weight: 300; /* Thinner font */
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.form-links a {
    color: var(--text-muted);
    font-weight: 300;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s;
}

.form-links a:hover {
    color: var(--text-main);
    border-bottom-color: var(--text-main);
}

.leftSection {
    display: flex;
    flex-direction: column;
    flex: 4;
    align-items: center;
    align-content: center;
    justify-content: center;
    height: 100vh;
    text-align: center;
    background-color: var(--bg-app);
}

.leftSection .logo {
    max-width: 300px;
}

.rightSection {
    flex: 6;
    background: var(--bg-app) url(/img/analys.jpg) no-repeat center center/cover;
    opacity: 1; /* Reset opacity on container */
    position: relative;
    border-radius: 0; /* Reset border radius for full height section */
    border: none;
}

/* Add an overlay to the image to ensure it fits the dark theme */
.rightSection::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, var(--bg-app), transparent 20%), 
                linear-gradient(to top, var(--bg-app), transparent);
    z-index: 1;
    pointer-events: none;
}

@media only screen and (max-width: 1200px) {
    .leftSection{
        flex:1;
    }
    
    .rightSection{
        flex:1;
    }
}

@media only screen and (max-width: 750px) {
    .rightSection{
        display: none;
    }
}