/* BA Intranet Global Styles - Consistent across all BA applications */

/* ===== BASE STYLES ===== */
body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    background-color: var(--body-bg);
    color: var(--text-color);
    padding-left: 300px; /* 250px sidebar + 50px margin */
    margin: 0;
    transition: padding-left var(--transition-normal);
}

/* ===== TYPOGRAPHY ===== */
h1 {
    font-size: 2rem;
    color: var(--main-color);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
}

h3 {
    font-size: 1.5rem;
    color: var(--text-color) !important; /* CRITICAL: Always black, never blue */
    font-weight: 500;
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--main-color);
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-normal);
}

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

.logo-link {
    text-decoration: none;
    color: var(--sidebar-text);
    display: block;
}

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

.sidebar-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--sidebar-text);
    line-height: 1.3;
    display: block;
}

.sidebar-nav {
    flex: 1;
    padding: 0;
}

.nav-link {
    display: block;
    padding: 15px 25px;
    color: var(--sidebar-text);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all var(--transition-fast);
}

.nav-link:hover {
    background-color: var(--sidebar-hover);
    color: var(--sidebar-text);
}

.nav-link.active {
    background-color: var(--sidebar-active);
    border-left-color: var(--sidebar-text);
}

.nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Collapsible Sections */
.nav-section-toggle {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-section-toggle i.fa-chevron-down {
    transition: transform var(--transition-fast);
}

.nav-section-toggle.expanded i.fa-chevron-down {
    transform: rotate(180deg);
}

.nav-subsection {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
    background-color: rgba(0, 0, 0, 0.1);
}

.nav-subsection.expanded {
    max-height: 500px;
}

.nav-subsection .nav-link {
    padding-left: 45px;
    font-size: 13px;
}

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

/* ===== MOBILE MENU TOGGLE ===== */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background-color: var(--main-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 10px 15px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-fast);
}

.mobile-menu-toggle:hover {
    background-color: var(--main-color-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ===== MAIN CONTAINER ===== */
.main-container {
    padding: 30px 50px 0 50px;
    width: auto;
    max-width: none;
    min-height: calc(100vh - 100px);
}

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

/* ===== CARDS ===== */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--card-shadow);
    border: none;
    margin-bottom: 20px;
    transition: all var(--transition-fast);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

.stats-card {
    text-align: center;
    border-left: 4px solid var(--main-color);
}

.stats-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--main-color);
    display: block;
}

.stats-label {
    font-size: 0.9rem;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

/* ===== BUTTONS ===== */
.btn {
    border-radius: var(--radius-md);
    padding: 8px 16px;
    font-weight: 500;
    font-size: 14px;
    transition: all var(--transition-fast);
    border: none;
}

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

.btn-primary:hover {
    background-color: var(--main-color-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

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

.btn-success {
    background-color: var(--status-active);
    color: white;
}

.btn-success:hover {
    background-color: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-danger {
    background-color: var(--status-danger);
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-info {
    background-color: var(--status-leased);
    color: white;
}

.btn-info:hover {
    background-color: #138496;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-outline-danger {
    border: 1px solid var(--status-danger);
    color: var(--status-danger);
    background: transparent;
}

.btn-outline-danger:hover {
    background-color: var(--status-danger);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ===== TABLES ===== */
.table {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table thead th {
    background-color: var(--main-color);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 500;
    border: none;
}

.table tbody td {
    padding: 12px;
    border-bottom: 1px solid var(--border-light);
}

.table tbody tr:hover {
    background-color: rgba(0, 51, 102, 0.05);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background-color: rgba(0, 51, 102, 0.05) !important;
}

/* ===== FORMS & INPUTS ===== */
.form-control {
    height: 32px;
    padding: 4px 8px;
    font-size: 13px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--input-border);
    transition: all var(--transition-fast);
}

.form-control:focus {
    border-color: var(--input-focus);
    outline: none;
    box-shadow: 0 0 0 2px var(--input-focus-shadow);
}

textarea.form-control {
    height: auto;
    padding: 8px 12px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 5px;
    display: block;
    color: var(--text-color);
}

.form-group.horizontal {
    display: flex;
    align-items: center;
    gap: 20px;
}

.form-group.horizontal label {
    min-width: 180px;
}

.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-color: var(--status-active);
    color: white;
}

.status-pending {
    background-color: var(--status-pending);
    color: var(--text-color);
}

.status-leased {
    background-color: var(--status-leased);
    color: white;
}

.status-danger {
    background-color: var(--status-danger);
    color: white;
}

/* ===== ALERTS ===== */
.alert {
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 20px;
}

/* ===== LOADING SPINNER ===== */
.spinner {
    border: 3px solid rgba(0, 51, 102, 0.1);
    border-top: 3px solid var(--main-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* ===== SERVICE STATUS INDICATORS ===== */
.service-status {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.service-status.active {
    background-color: var(--status-active);
    box-shadow: 0 0 8px var(--status-active);
}

.service-status.inactive {
    background-color: var(--status-danger);
}

/* ===== FOOTER ===== */
.footer {
    margin-left: -300px;
    padding-left: 300px;
    background-color: #f8f9fa;
    border-top: 1px solid var(--border-light);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    body {
        padding-left: 0;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-container {
        padding: 20px 10px 0 10px;
    }
    
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .footer {
        margin-left: 0;
        padding-left: 20px;
    }
    
    .stats-card {
        margin-bottom: 15px;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-main {
    color: var(--main-color) !important;
}

.bg-main {
    background-color: var(--main-color) !important;
}

.mt-60 {
    margin-top: 60px;
}

.mb-40 {
    margin-bottom: 40px;
}

/* ===== SCROLLBAR STYLING ===== */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

