/* ============================================================
   GCENA 360 — GLOBAL STYLES (Brand: Sky Blue + Leaf Green)
   ============================================================ */

:root {
    --brand-blue: #29ABE2;
    --brand-blue-dark: #1E8CBB;
    --brand-green: #7BC143;
    --brand-green-dark: #639B34;
    --brand-slate: #2C3E50;
    --primary-blue: #0d6efd;
    --sidebar-width: 280px;
}

* {
    box-sizing: border-box;
}

body {
    background: #f0f2f5;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================================
   NAVBAR — Sky Blue → Leaf Green
   ============================================================ */

.navbar-custom {
    background: linear-gradient(135deg, #29ABE2 0%, #7BC143 100%);
    box-shadow: 0 2px 12px rgba(41, 171, 226, 0.18);
    padding: 0;
    position: relative;    /* ← enables floating logo */
    z-index: 1040;
    height: 60px;
}

.navbar-custom .navbar-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    height: 60px;
    padding: 0 20px;
    gap: 16px;
}

/* ---- LEFT ---- */
.navbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-self: start;
}

.sidebar-toggle-btn {
    color: #fff;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    padding: 0;
    transition: all 0.15s ease;
}

.sidebar-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
    transform: scale(1.03);
}

.sidebar-toggle-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

/* ---- FLOATING LOGO (centered, overhanging) ---- */
.navbar-brand-floating {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    text-decoration: none;
    padding: 8px 18px;
    background: #fff;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(41, 171, 226, 0.25), 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.navbar-brand-floating:hover {
    transform: translate(-50%, -50%) scale(1.03);
    box-shadow: 0 6px 24px rgba(41, 171, 226, 0.35), 0 3px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand-floating .floating-logo {
    height: 60px;   
    width: auto;
    display: block;
}

/* ---- RIGHT ---- */
.navbar-right {
    justify-self: end;
    display: flex;
    align-items: center;
}

.navbar-right .navbar-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.navbar-right .nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
}

.navbar-right .nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff !important;
}

/* ---- User dropdown ---- */
.user-dropdown .dropdown-toggle {
    color: rgba(255, 255, 255, 0.95) !important;
    text-decoration: none;
    padding: 0.35rem 0.6rem;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.user-dropdown .dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff !important;
}

.user-dropdown .dropdown-toggle::after {
    margin-left: 0.5rem;
    opacity: 0.8;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

/* ============================================================
   NOTIFICATION DROPDOWN
   ============================================================ */

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
    background-color: #dc3545 !important;
    color: white;
    border: 2px solid #29ABE2;
    font-weight: 700;
}

.notification-dropdown {
    border: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
}

.notification-dropdown .dropdown-header {
    padding: 14px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e9ef;
}

.notification-dropdown .dropdown-divider {
    margin: 0;
}

.notification-item {
    transition: background-color 0.15s ease;
    border-left: 3px solid transparent;
    padding: 12px 16px;
}

.notification-item:hover {
    background-color: #f8fafc;
    border-left-color: #29ABE2;
}

.notification-item.unread {
    background-color: #eff9fd;
    border-left-color: #29ABE2;
}

.notification-item.unread:hover {
    background-color: #d6effa;
}

.notification-dropdown .dropdown-footer {
    padding: 12px;
    background: #f8fafc;
    border-top: 1px solid #e5e9ef;
}

.notification-dropdown-count {
    font-size: 0.75rem;
    color: #6c757d;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */

.main-content {
    flex: 1;
    padding: 1.5rem 0;
    min-height: calc(100vh - 60px);
}

/* ============================================================
   CARDS
   ============================================================ */

.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-weight: 600;
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

/* ============================================================
   KPI CARDS
   ============================================================ */

.kpi-card {
    border-left: 4px solid var(--brand-blue);
    transition: transform 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
}

.kpi-card .kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.kpi-card .kpi-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
}

.kpi-card .kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* ============================================================
   TABLES
   ============================================================ */

.table > :not(caption) > * > * {
    padding: 0.75rem 1rem;
}

.table-light th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    border-bottom: 2px solid #e9ecef;
}

.table-hover tbody tr:hover {
    background-color: rgba(41, 171, 226, 0.05);
}

/* ============================================================
   HELPERS
   ============================================================ */

.money {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.overdue {
    color: #dc3545;
    font-weight: 600;
}

.due {
    color: #9a6700;
}

.cursor-pointer {
    cursor: pointer;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bg-gradient-brand {
    background: linear-gradient(135deg, #29ABE2 0%, #7BC143 100%);
}

/* ============================================================
   BADGES / ALERTS
   ============================================================ */

.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

.alert {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.alert-dismissible .btn-close {
    padding: 1.25rem 1.25rem;
}

/* ============================================================
   FORMS
   ============================================================ */

.form-control,
.form-select {
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    padding: 0.6rem 1rem;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 0.2rem rgba(41, 171, 226, 0.15);
}

.form-label {
    font-weight: 500;
    font-size: 0.9rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
}

.btn-primary:hover,
.btn-primary:focus {
    background: #1E8CBB;
    border-color: #1E8CBB;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(41, 171, 226, 0.35);
}

.btn-success {
    background: var(--brand-green);
    border-color: var(--brand-green);
}

.btn-success:hover {
    background: #639B34;
    border-color: #639B34;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(123, 193, 67, 0.35);
}

.btn-outline-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(41, 171, 226, 0.2);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .navbar-custom,
    .navbar-custom .navbar-inner {
        height: 56px;
    }
    .navbar-custom .navbar-inner {
        padding: 0 12px;
    }
    .navbar-brand-floating {
        padding: 5px 12px;
    }
    .navbar-brand-floating .floating-logo {
        height: 36px;
    }
    .sidebar-toggle-btn {
        width: 34px;
        height: 34px;
        font-size: 1.2rem;
    }
    .user-avatar {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    .main-content {
        padding: 1rem 0;
    }
    .kpi-card .kpi-value {
        font-size: 1.25rem;
    }
}

/* ============================================================
   PRINT
   ============================================================ */

@media print {
    .navbar-custom,
    .btn {
        display: none !important;
    }
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
    body {
        background: #fff !important;
    }
}