/* Core global styles for BA intranet parity (using variables from colorscheme.css) */

body {
    font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    background: var(--body-bg);
    color: var(--text-primary);
    padding-left: 300px; /* 250px sidebar + 50px margin */
}

a {
    color: var(--link-color);
}

.main-container {
    padding: 28px 36px 0 36px;
    width: auto;
    max-width: none;
}

.container-fluid {
    padding-left: 50px;
    padding-right: 50px;
}

/* Headings */
h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    color: var(--main-color);
    font-weight: 500;
}
h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.75rem;
    font-weight: 500;
}
h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    color: var(--text-primary); /* must be BLACK */
    font-weight: 500;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 250px;
    background: var(--main-color);
    color: #fff;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
}

.logo-link {
    text-decoration: none;
    color: #fff;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.sidebar-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1.3;
    text-align: center;
}

.white-logo {
    height: 60px;
    filter: brightness(0) invert(1);
    margin-bottom: 10px;
}

.sidebar-nav {
    padding: 10px 0;
    overflow-y: auto;
}

.sidebar .nav-link {
    color: #fff;
    padding: 15px 25px;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    border-left-color: #fff;
}

.sidebar-bottom {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 12px 0;
}

/* Collapsible sections */
.nav-section-toggle {
    cursor: pointer;
    user-select: none;
}
.nav-section-toggle .chevron {
    margin-left: auto;
    transition: transform 0.2s ease;
}
.nav-section-toggle.expanded .chevron {
    transform: rotate(180deg);
}
.nav-subsection {
    max-height: 0;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.1);
    transition: max-height 0.25s ease;
}
.nav-subsection.expanded {
    max-height: 500px;
}
.sidebar .nav-subsection .nav-link {
    /* More specific than `.sidebar .nav-link`, so it actually indents */
    padding-left: 50px;
}

/* Buttons */
.btn-primary {
    background-color: var(--main-color);
    border-color: var(--main-color);
    border-radius: 4px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}
.btn-primary:hover {
    background-color: var(--hover-color);
    border-color: var(--hover-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.btn-primary:active {
    transform: translateY(0);
}

.btn-outline-primary {
    border-radius: 4px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}
.btn-outline-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-logout {
    background: linear-gradient(135deg, var(--danger-color), #c82333);
    border: none;
    border-radius: 6px;
    color: #fff;
    padding: 8px 16px;
    margin: 0 25px;
    transition: all 0.2s ease;
}
.btn-logout:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Cards */
.card-standard {
    background: #fff;
    border-radius: var(--ui-border-radius-sm);
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid var(--ui-border-color);
    transition: all 0.2s ease;
}
.card-standard:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.stats-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-left: 4px solid var(--main-color);
    text-align: center;
    transition: all 0.2s ease;
}
.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.stats-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--main-color);
}
.stats-label {
    font-size: 0.9rem;
    color: var(--text-color);
}

/* Tables */
th {
    background-color: var(--main-color);
    color: #fff;
    padding: 12px;
    text-align: left;
}
td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}
tr:hover {
    background-color: rgba(0, 51, 102, 0.05);
}
.clickable-row {
    cursor: pointer;
}
.clickable-row:hover {
    background-color: rgba(0, 51, 102, 0.05) !important;
}

/* Forms */
input, select {
    height: 32px;
    padding: 4px 8px;
    font-size: 13px;
    border-radius: 3px;
    border: 1px solid #ddd;
}
textarea {
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 3px;
    border: 1px solid #ddd;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--main-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 51, 102, 0.1);
}
.form-group.horizontal {
    display: flex;
    align-items: center;
    gap: 20px;
}
.form-group.horizontal label {
    min-width: 180px;
    font-weight: 500;
}
.form-group.horizontal input {
    width: 200px;
}

/* Status badges */
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}
.status-active { background: var(--success-color); color: #fff; }
.status-pending { background: var(--warning-color); color: #000; }
.status-warning { background: var(--warning-color); color: #000; }
.status-leased { background: var(--info-color); color: #fff; }
.status-danger { background: var(--danger-color); color: #fff; }

/* Mobile */
.mobile-menu-toggle {
    position: fixed;
    top: 15px;
    left: 15px;
    background: var(--main-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 12px;
    z-index: 1100;
    display: none;
    transition: all 0.2s ease;
}
.mobile-menu-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    body {
        padding-left: 0;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .main-container {
        padding: 20px 10px 0 10px;
    }
}
