﻿/* wwwroot/css/kadits.css */

/* ================================
   ROOT VARIABLES & RESET
   ================================ */
:root {
    /* Primary Colors - From Logo */
    --kaduna-green: #1a7a2e;
    --kaduna-green-light: #2d9d4a;
    --kaduna-green-dark: #0f5a1f;
    --kaduna-green-bg: #e8f5ee;
    --kaduna-green-gradient: linear-gradient(135deg, #1a7a2e 0%, #2d9d4a 100%);
    --kaduna-gold: #c9a84c;
    --kaduna-gold-light: #e8d5a3;
    --kaduna-gold-dark: #a8872e;
    --kaduna-gold-gradient: linear-gradient(135deg, #c9a84c 0%, #e8d5a3 100%);
    --kaduna-white: #ffffff;
    --kaduna-gray-light: #f8f9fa;
    --kaduna-gray: #6c757d;
    --kaduna-dark: #1a2a3a;
    /* Shadows */
    --shadow-primary: 0 4px 24px rgba(26, 122, 46, 0.25);
    --shadow-gold: 0 4px 24px rgba(201, 168, 76, 0.25);
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.12);
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f0f4f8;
    color: var(--kaduna-dark);
    overflow-x: hidden;
}

/* ================================
   NAVBAR - Premium Look
   ================================ */
.kadits-navbar {
    background: var(--kaduna-white);
    padding: 0 2rem;
    height: 72px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    border-bottom: 3px solid var(--kaduna-green);
}

    .kadits-navbar .navbar-brand {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .kadits-navbar .brand-text {
        font-family: 'Playfair Display', serif;
        font-weight: 700;
        font-size: 1.5rem;
        color: var(--kaduna-green);
        letter-spacing: -0.5px;
    }

    .kadits-navbar .brand-subtitle {
        font-size: 0.65rem;
        font-weight: 500;
        color: var(--kaduna-gray);
        text-transform: uppercase;
        letter-spacing: 1.5px;
        background: var(--kaduna-gray-light);
        padding: 2px 10px;
        border-radius: 20px;
        margin-left: 4px;
    }

    .kadits-navbar .nav-link {
        color: var(--kaduna-dark);
        font-weight: 500;
        padding: 0.5rem 1rem;
        border-radius: var(--radius-sm);
        transition: all 0.3s ease;
        position: relative;
    }

        .kadits-navbar .nav-link:hover {
            background: var(--kaduna-green-bg);
            color: var(--kaduna-green);
        }

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--kaduna-gold);
    color: white;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 18px;
    text-align: center;
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--kaduna-green-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Notification Dropdown */
.notification-dropdown {
    width: 380px;
    padding: 0;
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-hover);
}

    .notification-dropdown .dropdown-header {
        padding: 1rem 1.25rem;
        font-weight: 600;
        border-bottom: 1px solid #eee;
    }

/* ================================
   SIDEBAR - Elegant Navigation
   ================================ */
.kadits-sidebar {
    position: fixed;
    top: 72px;
    left: 0;
    bottom: 0;
    width: 260px;
    background: var(--kaduna-white);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    z-index: 1020;
    overflow-y: auto;
}

.sidebar-content {
    flex: 1;
    padding: 1.5rem 1rem;
}

.kadits-sidebar .nav-link {
    color: var(--kaduna-gray);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 2px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 14px;
}

    .kadits-sidebar .nav-link i {
        width: 20px;
        font-size: 1.1rem;
        color: var(--kaduna-gray);
        transition: all 0.3s ease;
    }

    .kadits-sidebar .nav-link:hover {
        background: var(--kaduna-green-bg);
        color: var(--kaduna-green);
        transform: translateX(4px);
    }

        .kadits-sidebar .nav-link:hover i {
            color: var(--kaduna-green);
        }

    .kadits-sidebar .nav-link.active {
        background: var(--kaduna-green-gradient);
        color: white;
        box-shadow: var(--shadow-primary);
    }

        .kadits-sidebar .nav-link.active i {
            color: white;
        }

.sidebar-footer {
    padding: 1.5rem 1rem;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kadstra-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .kadstra-brand span {
        font-weight: 600;
        font-size: 0.85rem;
        color: var(--kaduna-green);
    }

.version {
    font-size: 0.7rem;
    color: var(--kaduna-gray);
    background: var(--kaduna-gray-light);
    padding: 2px 10px;
    border-radius: 20px;
}

/* ================================
   MAIN CONTENT
   ================================ */
.main-container {
    display: flex;
    margin-top: 72px;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
    min-height: calc(100vh - 72px);
}

/* ================================
   DASHBOARD CARDS - Premium Stats
   ================================ */
.stat-card {
    background: var(--kaduna-white);
    border-radius: var(--radius-md);
    padding: 1.5rem 1.75rem;
    border: none;
    box-shadow: var(--shadow-card);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
}

    .stat-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-hover);
    }

    .stat-card .stat-icon {
        width: 52px;
        height: 52px;
        border-radius: var(--radius-sm);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

        .stat-card .stat-icon.green {
            background: var(--kaduna-green-bg);
            color: var(--kaduna-green);
        }

        .stat-card .stat-icon.gold {
            background: #f5f0e0;
            color: var(--kaduna-gold);
        }

        .stat-card .stat-icon.blue {
            background: #e3f0ff;
            color: #2563eb;
        }

        .stat-card .stat-icon.purple {
            background: #f0e8ff;
            color: #7c3aed;
        }

    .stat-card .stat-number {
        font-family: 'Playfair Display', serif;
        font-size: 2.2rem;
        font-weight: 700;
        color: var(--kaduna-dark);
        line-height: 1.2;
    }

    .stat-card .stat-label {
        font-size: 0.85rem;
        color: var(--kaduna-gray);
        font-weight: 500;
    }

    .stat-card .stat-change {
        font-size: 0.75rem;
        font-weight: 600;
        padding: 2px 12px;
        border-radius: 20px;
        display: inline-block;
    }

.stat-change.up {
    color: var(--kaduna-green);
    background: var(--kaduna-green-bg);
}

.stat-change.down {
    color: #dc3545;
    background: #fde8ec;
}

.stat-card .stat-decoration {
    position: absolute;
    right: -20px;
    top: -20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    opacity: 0.08;
}

    .stat-card .stat-decoration.green {
        background: var(--kaduna-green);
    }

    .stat-card .stat-decoration.gold {
        background: var(--kaduna-gold);
    }

/* ================================
   CARDS - Premium Cards
   ================================ */
.kadits-card {
    background: var(--kaduna-white);
    border-radius: var(--radius-md);
    border: none;
    box-shadow: var(--shadow-card);
    transition: all 0.4s ease;
    overflow: hidden;
}

    .kadits-card:hover {
        box-shadow: var(--shadow-hover);
    }

    .kadits-card .card-header {
        background: transparent;
        border-bottom: 1px solid #f0f0f0;
        padding: 1.25rem 1.5rem;
        font-weight: 600;
    }

        .kadits-card .card-header .card-title {
            font-weight: 600;
            font-size: 1.1rem;
            margin: 0;
        }

    .kadits-card .card-body {
        padding: 1.5rem;
    }

/* ================================
   TABLES - Clean & Professional
   ================================ */
.kadits-table {
    border-radius: var(--radius-sm);
    overflow: hidden;
}

    .kadits-table thead th {
        background: var(--kaduna-gray-light);
        font-weight: 600;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--kaduna-gray);
        padding: 0.75rem 1rem;
        border: none;
    }

    .kadits-table tbody td {
        padding: 0.85rem 1rem;
        border-bottom: 1px solid #f0f0f0;
        vertical-align: middle;
    }

    .kadits-table tbody tr:hover {
        background: var(--kaduna-green-bg);
    }

/* ================================
   BADGES
   ================================ */
.badge-status {
    padding: 4px 14px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

    .badge-status.approved {
        background: var(--kaduna-green-bg);
        color: var(--kaduna-green);
    }

    .badge-status.pending {
        background: #fef3c7;
        color: #d97706;
    }

    .badge-status.rejected {
        background: #fde8ec;
        color: #dc3545;
    }

    .badge-status.suspended {
        background: #fef3c7;
        color: #d97706;
    }

    .badge-status.expired {
        background: #f1f3f4;
        color: #6c757d;
    }

    .badge-status.active {
        background: #d1fae5;
        color: #065f46;
    }

/* ================================
   BUTTONS - Premium Buttons
   ================================ */
.btn-kaduna {
    background: var(--kaduna-green-gradient);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.3s ease;
}

    .btn-kaduna:hover {
        background: linear-gradient(135deg, var(--kaduna-green-dark), var(--kaduna-green));
        color: white;
        transform: translateY(-2px);
        box-shadow: var(--shadow-primary);
    }

.btn-kaduna-gold {
    background: var(--kaduna-gold-gradient);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.3s ease;
}

    .btn-kaduna-gold:hover {
        background: linear-gradient(135deg, var(--kaduna-gold-dark), var(--kaduna-gold));
        color: white;
        transform: translateY(-2px);
        box-shadow: var(--shadow-gold);
    }

.btn-outline-kaduna {
    border: 2px solid var(--kaduna-green);
    color: var(--kaduna-green);
    background: transparent;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.3s ease;
}

    .btn-outline-kaduna:hover {
        background: var(--kaduna-green);
        color: white;
        transform: translateY(-2px);
    }

/* ================================
   STATS ROW - KPI Cards
   ================================ */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* ================================
   SECTION HEADERS
   ================================ */
.section-header {
    margin-bottom: 2rem;
}

    .section-header h1 {
        font-family: 'Playfair Display', serif;
        font-weight: 700;
        font-size: 2rem;
        color: var(--kaduna-dark);
    }

    .section-header .subtitle {
        color: var(--kaduna-gray);
        font-size: 0.95rem;
    }

    .section-header .breadcrumb {
        background: transparent;
        padding: 0;
        margin: 0;
    }

    .section-header .breadcrumb-item a {
        color: var(--kaduna-green);
        text-decoration: none;
    }

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 992px) {
    .kadits-sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

        .kadits-sidebar.show {
            transform: translateX(0);
        }

    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }

    .kadits-navbar .brand-subtitle {
        display: none;
    }
}

@media (max-width: 576px) {
    .kadits-navbar {
        padding: 0 1rem;
    }

    .main-content {
        padding: 1rem;
    }

    .stat-card .stat-number {
        font-size: 1.6rem;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }
}

/* ================================
   ANIMATIONS
   ================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.5s ease forwards;
}

    .animate-in:nth-child(1) {
        animation-delay: 0.05s;
    }

    .animate-in:nth-child(2) {
        animation-delay: 0.1s;
    }

    .animate-in:nth-child(3) {
        animation-delay: 0.15s;
    }

    .animate-in:nth-child(4) {
        animation-delay: 0.2s;
    }

    .animate-in:nth-child(5) {
        animation-delay: 0.25s;
    }

    .animate-in:nth-child(6) {
        animation-delay: 0.3s;
    }

/* ================================
   SCROLLBAR
   ================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--kaduna-green);
    border-radius: 10px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--kaduna-green-dark);
    }

/* Add to wwwroot/css/kadits.css */

/* ============================================================
   QUICK ACTION WIDGETS
   ============================================================ */
.quick-action-widget {
    background: var(--kaduna-white);
    border-radius: var(--radius-md);
    padding: 1.5rem 1rem;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
}

    .quick-action-widget:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-hover);
        border-color: var(--kaduna-green);
    }

    .quick-action-widget .widget-icon {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 0.75rem;
    }

    .quick-action-widget .widget-label {
        font-weight: 600;
        font-size: 0.85rem;
        color: var(--kaduna-dark);
        margin-bottom: 0.25rem;
    }

    .quick-action-widget .widget-count {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--kaduna-green);
    }

/* ============================================================
   STAT CARD IMPROVEMENTS
   ============================================================ */
.stat-card .stat-change {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    display: inline-block;
}

.stat-change.up {
    color: var(--kaduna-green);
    background: var(--kaduna-green-bg);
}

.stat-change.down {
    color: #dc3545;
    background: #fde8ec;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

    .animate-in:nth-child(1) {
        animation-delay: 0.05s;
    }

    .animate-in:nth-child(2) {
        animation-delay: 0.1s;
    }

    .animate-in:nth-child(3) {
        animation-delay: 0.15s;
    }

    .animate-in:nth-child(4) {
        animation-delay: 0.2s;
    }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .quick-action-widget {
        padding: 1rem 0.5rem;
    }

        .quick-action-widget .widget-icon {
            width: 40px;
            height: 40px;
            font-size: 1.2rem;
        }

        .quick-action-widget .widget-count {
            font-size: 1.2rem;
        }

        .quick-action-widget .widget-label {
            font-size: 0.75rem;
        }
}

/* Add to wwwroot/css/kadits.css */

/* ============================================================
   SMOOTH UPDATE INDICATOR
   ============================================================ */
.stat-card.updating {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.stat-card .stat-number {
    transition: color 0.3s ease;
}

    .stat-card .stat-number.updated {
        color: var(--kaduna-green);
    }

/* ============================================================
   UPDATE TOAST
   ============================================================ */
#updateToast .toast {
    border-radius: var(--radius-md);
    border-left: 4px solid var(--kaduna-green);
    box-shadow: var(--shadow-hover);
    min-width: 300px;
}

#updateToast .toast-header {
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

#updateToast .toast-body {
    padding: 0.75rem 1rem;
}

/* ============================================================
   REFRESH BUTTON ANIMATION
   ============================================================ */
.btn-outline-secondary .fa-sync-alt {
    transition: transform 0.3s ease;
}

    .btn-outline-secondary .fa-sync-alt.fa-spin {
        animation: fa-spin 1s linear infinite;
    }

/* ============================================================
   LIVE STATUS INDICATOR
   ============================================================ */
#liveStatus {
    animation: pulse-live 2s infinite;
}

@keyframes pulse-live {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* ============================================================
   TOAST ANIMATION
   ============================================================ */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

#updateToast .toast {
    animation: slideInRight 0.3s ease forwards;
}