/* 
    BMD ASSOCIATE - PROFESSIONAL LEGAL THEME
    Full Responsive CSS with Sidebar and Table-to-Card Logic
*/

:root {
    --primary-navy: #1a237e;
    --accent-gold: #ffc107;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --text-dark: #2c3e50;
    --sidebar-width: 260px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Global Resets --- */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* --- Layout Wrapper --- */
#wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* --- Sidebar Styling --- */
#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: var(--primary-navy);
    color: #fff;
    transition: var(--transition);
    min-height: 100vh;
    z-index: 1050;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
}

#sidebar .sidebar-header {
    padding: 25px;
    text-align: center;
    background: rgba(0,0,0,0.15);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

#sidebar ul.components {
    padding: 20px 0;
}

#sidebar ul li a {
    padding: 12px 25px;
    font-size: 0.95rem;
    display: block;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
    border-left: 4px solid transparent;
}

#sidebar ul li a:hover, 
#sidebar ul li.active > a {
    color: #fff;
    background: rgba(255,255,255,0.1);
    border-left-color: var(--accent-gold);
}

#sidebar ul li.logout-link a:hover {
    background: rgba(220, 53, 69, 0.1);
    border-left-color: #dc3545;
}

/* --- Main Content Area --- */
#content {
    width: 100%;
    min-height: 100vh;
    transition: var(--transition);
    background: var(--bg-light);
}

.navbar {
    background: var(--white);
    padding: 15px 20px;
    border: none;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

/* --- Responsive Sidebar Logic --- */
@media (max-width: 991px) {
    #sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
        position: fixed;
        height: 100vh;
    }
    #sidebar.active {
        margin-left: 0 !important;
    }
}

/* Optional: Desktop Collapse */
@media (min-width: 992px) {
    #sidebar.active {
        margin-left: calc(-1 * var(--sidebar-width));
    }
}

/* --- Cards & Dashboard --- */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.04);
    margin-bottom: 20px;
}

.icon-box {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    margin-bottom: 15px;
}

.bg-primary-light { background: #e8eaf6; color: var(--primary-navy); }
.bg-warning-light { background: #fff8e1; color: #f57f17; }
.bg-success-light { background: #e8f5e9; color: #2e7d32; }
.bg-danger-light { background: #ffebee; color: #c62828; }

/* --- Table to Card (Mobile View) --- */
.table thead th {
    background-color: #f1f4f8;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: #6c757d;
    border: none;
}

@media (max-width: 991px) {
    .responsive-card-table thead {
        display: none;
    }
    .responsive-card-table tbody tr {
        display: block;
        background: #fff;
        margin-bottom: 15px;
        padding: 10px;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }
    .responsive-card-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 10px 5px;
        border-bottom: 1px solid #f1f1f1;
    }
    .responsive-card-table td:last-child { border: none; }
    .responsive-card-table td::before {
        content: attr(data-label);
        font-weight: 700;
        text-align: left;
        font-size: 0.8rem;
        color: #999;
    }
}

/* --- PWA / Mobile App Improvements --- */
@media all and (display-mode: standalone) {
    .navbar {
        padding-top: env(safe-area-inset-top);
    }
}

/* --- Forms & Buttons --- */
.form-control, .form-select {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.form-control:focus {
    border-color: var(--primary-navy);
    box-shadow: 0 0 0 0.2rem rgba(26, 35, 126, 0.1);
}

.btn-primary {
    background-color: var(--primary-navy);
    border: none;
    padding: 10px 20px;
}

.btn-primary:hover {
    background-color: #0d144d;
}

/* --- Login Page Specific --- */
.login-page-bg {
    background: linear-gradient(135deg, var(--primary-navy) 0%, #0d47a1 100%);
    height: 100vh;
}

.login-card {
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

/* --- Calendar Styling --- */
#calendar {
    background: #fff;
    border-radius: 12px;
    padding: 10px;
}

.fc-toolbar-title {
    font-size: 1.2rem !important;
    color: var(--primary-navy);
    font-weight: bold;
}