/* ================================================================
   MAIN STYLESHEET - Physics Conference 2026
   Comprehensive styling for all pages
   ================================================================ */

:root {
    /* CoMSAR public-site palette */
    --primary: #e85d14;
    --primary-dark: #061a33;
    --success: #198754;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #f47a20;
    --light: #f4f7fa;
    --dark: #061a33;
    --border-radius: 14px;
    --shadow-sm: 0 2px 10px rgba(7, 22, 47, 0.05);
    --shadow-md: 0 3px 12px rgba(7, 22, 47, 0.07);
    --shadow-lg: 0 10px 30px rgba(7, 22, 47, 0.12);
}

/* ================================================================
   GLOBAL STYLES
   ================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light);
    color: #23395d;
    line-height: 1.6;
}

/* ================================================================
   LAYOUT COMPONENTS
   ================================================================ */

.layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
    position: relative;
    z-index: 1;
}

.sidebar {
    background: var(--primary-dark);
    color: #fff;
    padding-bottom: 24px;
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.logo {
    padding: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    background: linear-gradient(135deg, rgba(18, 52, 95, 0.8), rgba(7, 22, 47, 0.45));
}

.logo h3 {
    margin: 0;
    font-weight: 700;
    font-size: 18px;
}

.logo p {
    margin: 6px 0 0;
    opacity: 0.85;
    font-size: 13px;
}

.sidebar nav {
    margin-top: 10px;
}

.sidebar a {
    display: block;
    color: #fff;
    padding: 14px 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar a:hover {
    background: rgba(255, 255, 255, 0.13);
    border-left-color: var(--info);
    padding-left: 22px;
}

.sidebar a.active {
    background: rgba(255, 255, 255, 0.2);
    border-left-color: var(--info);
}

.sidebar a i {
    margin-right: 10px;
    width: 18px;
    text-align: center;
}

.topbar {
    background: #fff;
    padding: 22px 28px;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.topbar h4 {
    margin: 0;
    color: #07162f;
    font-weight: 600;
}

.content {
    padding: 28px;
    overflow-y: auto;
    max-height: calc(100vh - 80px);
}

/* ================================================================
   CARDS & PANELS
   ================================================================ */

.panel, .status-card, .module-card {
    border: 0;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.panel:hover, .status-card:hover, .module-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.status-card .card-body {
    min-height: 150px;
    display: grid;
    align-content: center;
    text-align: center;
}

.card-icon, .module-icon {
    font-size: 34px;
    margin-bottom: 10px;
    display: inline-block;
}

.card-title {
    color: #65717d;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
}

.card-value {
    font-size: 19px;
    font-weight: 700;
    overflow-wrap: anywhere;
    color: #07162f;
}

.module-card .card-body {
    min-height: 180px;
    display: grid;
    align-content: center;
    text-align: center;
}

.module-card a {
    text-decoration: none;
    color: inherit;
}

.footer-box {
    background: #fff;
    padding: 22px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    height: 100%;
}

/* ================================================================
   FORMS & INPUTS
   ================================================================ */

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #e5ecf8;
    padding: 10px 15px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(217, 79, 0, 0.15);
}

.form-control.is-invalid, .form-select.is-invalid {
    border-color: var(--danger);
}

.form-control.is-invalid:focus, .form-select.is-invalid:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

.invalid-feedback {
    display: block;
    color: var(--danger);
    font-size: 13px;
    margin-top: 5px;
}

.valid-feedback {
    display: block;
    color: var(--success);
    font-size: 13px;
    margin-top: 5px;
}

label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #07162f;
}

/* ================================================================
   BUTTONS
   ================================================================ */

.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 10px 20px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: #ef6c00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 79, 0, 0.3);
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-warning {
    background: var(--warning);
    color: #000;
}

/* ================================================================
   ALERTS & NOTIFICATIONS
   ================================================================ */

.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 16px 20px;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: #d1e7dd;
    color: #0f5132;
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: #f8d7da;
    color: #842029;
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: #fff3cd;
    color: #664d03;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: #cfe2ff;
    color: #084298;
    border-left: 4px solid var(--info);
}

/* ================================================================
   TABLES
   ================================================================ */

.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f8f9fa;
    border: none;
    font-weight: 600;
    color: #333;
    padding: 12px 15px;
    border-bottom: 2px solid #dee2e6;
}

.table tbody td {
    padding: 12px 15px;
    border-color: #dee2e6;
    vertical-align: middle;
}

.table tbody tr {
    transition: background-color 0.3s ease;
}

.table tbody tr:hover {
    background-color: #f9f9f9;
}

.table-responsive {
    display:block;
    width:100%;
    max-width:100%;
    box-sizing:border-box;
    border-radius: var(--border-radius);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-responsive table {
    min-width:100%;
    width:auto !important;
    box-sizing:border-box;
}

/* ================================================================
   BADGES
   ================================================================ */

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: var(--success);
    color: #fff;
}

.badge-danger {
    background: var(--danger);
    color: #fff;
}

.badge-warning {
    background: var(--warning);
    color: #000;
}

.badge-info {
    background: var(--info);
    color: #fff;
}

.badge-pending {
    background: #e2e3e5;
    color: #383d41;
}

/* ================================================================
   MODALS
   ================================================================ */

.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    border: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* ================================================================
   LOADING STATES
   ================================================================ */

.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.spinner-content {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.spinner-content p {
    margin-top: 15px;
    font-size: 16px;
    color: #333;
}

/* ================================================================
   PASSWORD STRENGTH INDICATOR
   ================================================================ */

.password-strength {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 5px;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    background: var(--danger);
}

.password-strength-bar.fair {
    background: var(--warning);
}

.password-strength-bar.good {
    background: var(--info);
}

.password-strength-bar.strong {
    background: var(--success);
}

/* ================================================================
   GRADIENTS & BACKGROUNDS
   ================================================================ */

.gradient-primary {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
}

.gradient-success {
    background: linear-gradient(135deg, var(--success), #0f5132);
    color: #fff;
}

/* ================================================================
   TEXT UTILITIES
   ================================================================ */

.text-muted {
    color: #6c757d !important;
}

.text-primary {
    color: var(--primary) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.text-success {
    color: var(--success) !important;
}

/* ================================================================
   RESPONSIVE DESIGN
   ================================================================ */

@media (max-width: 820px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
    }

    .topbar {
        padding: 15px 20px;
    }

    .content {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar a {
        padding: 12px 15px;
        font-size: 14px;
    }

    .card-icon, .module-icon {
        font-size: 28px;
    }

    .card-value {
        font-size: 16px;
    }

    .btn {
        padding: 8px 15px;
        font-size: 13px;
    }
}

/* ================================================================
   SCROLLBAR STYLING
   ================================================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ================================================================
   UTILITY CLASSES
   ================================================================ */

.rounded-lg {
    border-radius: var(--border-radius);
}

.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.transition-all {
    transition: all 0.3s ease;
}

.cursor-pointer {
    cursor: pointer;
}
