@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --ink: #0f172a;              /* deep slate */
    --paper: #ffffff;
    --muted: #64748b;            /* slate 500 */

    /* Logo-inspired accents (amber + blue) */
    --primary: #3b82f6;         /* vibrant blue */
    --primary-hover: #2563eb;
    --accent: #f59e0b;          /* amber */

    --danger: #ef4444;
    --ok: #10b981;

    /* Soft premium atmospheric shadows */
    --shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.04), 0 8px 10px -6px rgba(15, 23, 42, 0.02);
    --shadow-sm: 0 4px 6px -1px rgba(15, 23, 42, 0.03), 0 2px 4px -1px rgba(15, 23, 42, 0.01);
    --shadow-md: 0 20px 25px -5px rgba(15, 23, 42, 0.06), 0 10px 10px -5px rgba(15, 23, 42, 0.02);

    /* Ultra-thin elegant borders */
    --outline: 1px solid rgba(226, 232, 240, 0.8);

    --radius: 16px;
}

body {
    background: #f8fafc; /* premium slate-50 background */
    color: var(--ink);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: -0.01em;
}

a {
    color: inherit;
    text-decoration: none;
}
a:hover { text-decoration: none; }

/* Brand partial */
.brand-bar {
    margin: 16px auto 0;
    max-width: 1200px;

    display: flex;
    align-items: center;
    gap: 12px;

    border: var(--outline);
    background: rgba(255,255,255,0.92);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);

    padding: 12px 14px;
}

.brand-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.brand-title .brand-name {
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: 20px;
    line-height: 1.1;
}

.brand-title .brand-subtitle {
    font-weight: 650;
    font-size: 13px;
    color: var(--muted);
    margin-top: 2px;
}

/* Page header */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.page-title {
    font-weight: 750;
    letter-spacing: -0.02em;
    margin-bottom: 2px;
}

.page-subtitle {
    margin: 0;
    color: var(--muted);
    font-weight: 550;
}

.page-body {
    margin: 0;
    color: var(--muted);
    font-weight: 450;
}

/* Cards */
.brutal-card {
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow) !important;
    background: #ffffff !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    overflow: hidden;
}

.brutal-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md) !important;
    border-color: rgba(59, 130, 246, 0.25) !important;
}

/* Elegant glowing indicator for cards */
.brutal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: transparent;
    transition: background 0.3s ease;
}

.card-blue::before { background: linear-gradient(90deg, #3b82f6, #60a5fa) !important; }
.card-green::before { background: linear-gradient(90deg, #10b981, #34d399) !important; }
.card-purple::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa) !important; }
.card-amber::before { background: linear-gradient(90deg, #f59e0b, #fbbf24) !important; }

.border-brutal {
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    box-shadow: var(--shadow-sm) !important;
    border-radius: 12px !important;
}

/* Icons and Badges for Stats Cards */
.icon-badge {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-badge-blue {
    background: rgba(59, 130, 246, 0.08);
    color: #3b82f6;
}
.icon-badge-green {
    background: rgba(16, 185, 129, 0.08);
    color: #10b981;
}
.icon-badge-purple {
    background: rgba(139, 92, 246, 0.08);
    color: #8b5cf6;
}
.icon-badge-amber {
    background: rgba(245, 158, 11, 0.08);
    color: #f59e0b;
}

.brutal-card:hover .icon-badge-blue {
    background: #3b82f6;
    color: #ffffff;
    transform: scale(1.05) rotate(-3deg);
}
.brutal-card:hover .icon-badge-green {
    background: #10b981;
    color: #ffffff;
    transform: scale(1.05) rotate(-3deg);
}
.brutal-card:hover .icon-badge-purple {
    background: #8b5cf6;
    color: #ffffff;
    transform: scale(1.05) rotate(-3deg);
}
.brutal-card:hover .icon-badge-amber {
    background: #f59e0b;
    color: #ffffff;
    transform: scale(1.05) rotate(-3deg);
}

/* Buttons */
.btn-brutal {
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    box-shadow: var(--shadow-sm) !important;
    padding: 10px 18px !important;
    line-height: 1.5 !important;
    letter-spacing: -0.01em !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-brutal:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -6px rgba(15, 23, 42, 0.12) !important;
}

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

.link-brutal {
    border-bottom: 2px solid rgba(245, 158, 11, 0.5);
    font-weight: 600;
    transition: border-color 0.2s ease;
}

.link-brutal:hover {
    border-color: rgba(245, 158, 11, 1);
}

.btn-primary.btn-brutal {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25) !important;
}

.btn-primary.btn-brutal:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35) !important;
}

.btn-outline-primary.btn-brutal {
    border-color: rgba(59, 130, 246, 0.4) !important;
    color: #2563eb !important;
    background: #fff !important;
}

.btn-outline-primary.btn-brutal:hover {
    background: rgba(59, 130, 246, 0.05) !important;
    border-color: #2563eb !important;
}

.btn-outline-secondary.btn-brutal {
    border-color: rgba(100, 116, 139, 0.3) !important;
    color: #475569 !important;
    background: #fff !important;
}

.btn-outline-secondary.btn-brutal:hover {
    background: #f8fafc !important;
    color: #0f172a !important;
}

.btn-outline-danger.btn-brutal {
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #ef4444 !important;
    background: #fff !important;
}

.btn-outline-danger.btn-brutal:hover {
    background: rgba(239, 68, 68, 0.05) !important;
    color: #dc2626 !important;
}

/* Inputs */
.brutal-input {
    border: 1px solid rgba(226, 232, 240, 1) !important;
    border-radius: 12px !important;
    font-weight: 500 !important;
    background: #fff !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
    padding: 10px 14px !important;
}

.brutal-input:focus {
    border-color: rgba(59, 130, 246, 0.5) !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1) !important;
}

/* Tables */
.brutal-table {
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.brutal-table th {
    font-weight: 600;
    background: #f8fafc;
    border-bottom: 1px solid rgba(226, 232, 240, 1) !important;
    color: #475569;
    padding: 14px 16px !important;
}

.brutal-table td {
    font-weight: 500;
    color: #0f172a;
    padding: 14px 16px !important;
    border-bottom: 1px solid rgba(241, 245, 249, 1) !important;
}

.brutal-table tr:last-child td {
    border-bottom: none !important;
}

/* Badges */
.badge {
    font-weight: 600 !important;
    border-radius: 100px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    border: 1px solid transparent;
}

.badge-success.border-brutal {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #059669 !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
}

.badge-expired.border-brutal {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #dc2626 !important;
    border-color: rgba(239, 68, 68, 0.2) !important;
}

.badge-info.border-brutal {
    background: rgba(59, 130, 246, 0.1) !important;
    color: #2563eb !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
}

/* Pagination (Bootstrap default generated by $paginator->links()) */
.pagination {
    margin: 0 !important;
    gap: 6px;
}

.pagination .page-link {
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    background: #fff !important;
    box-shadow: var(--shadow-sm) !important;
    padding: 8px 14px !important;
    transition: all 0.2s ease !important;
}

.pagination .page-item.active .page-link {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #fff !important;
}

.pagination .page-item.disabled .page-link {
    color: #94a3b8 !important;
    background: #f8fafc !important;
    border-color: rgba(226, 232, 240, 0.5) !important;
}

.pagination .page-link:hover:not(.active) {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

.highlight-expiry,
.brutal-card .highlight-expiry,
.card-body .highlight-expiry {
    background-color: #FFEDD5 !important;
    border-left: 4px solid #F97316 !important;
}

.brutal-card.highlight-expiry {
    background-color: #FFEDD5 !important;
    border-color: #F97316 !important;
}

/* Detail grid */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.detail-item {
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    background: #fff !important;
    box-shadow: var(--shadow-sm) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.detail-item:hover {
    border-color: rgba(59, 130, 246, 0.2) !important;
    background: rgba(248, 250, 252, 0.5) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -3px rgba(15, 23, 42, 0.04) !important;
}

.detail-item-full {
    grid-column: 1 / -1;
}

.detail-label {
    font-weight: 600;
    letter-spacing: -0.01em;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 4px;
}

.detail-value {
    font-weight: 700;
    color: #0f172a;
    word-break: break-word;
    font-size: 15px;
}

/* Dashboard layout (slim + light) */
.dashboard-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
}

.dashboard-topbar {
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 14px 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 100;

    box-shadow: 0 4px 20px -5px rgba(15, 23, 42, 0.03);
}

.dashboard-topbar-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 8px;
}

.dashboard-app-name {
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.dashboard-app-tag {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}

.dashboard-topbar-left,
.dashboard-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dashboard-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 14px;
    background: rgba(241, 245, 249, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.5);
}

.dashboard-user-name {
    font-weight: 600;
    color: #334155;
    font-size: 14px;
}

.dashboard-body {
    flex: 1;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    padding: 24px;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

.dashboard-sidebar {
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
    padding: 20px 16px;
    height: fit-content;
    position: sticky;
    top: 96px;
}

.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dashboard-nav-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin: 18px 12px 6px;
}

.dashboard-nav-item {
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;

    background: transparent;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s ease;
}

.dashboard-nav-item:hover {
    background: #f8fafc;
    color: #0f172a;
}

/* Active navigation item styling using a premium glow style */
.dashboard-nav-item[href*="home"],
.dashboard-nav-item:active {
    background: rgba(59, 130, 246, 0.08) !important;
    color: #2563eb !important;
    border-color: rgba(59, 130, 246, 0.08) !important;
}

.dashboard-nav-item-muted {
    background: transparent !important;
    color: #94a3b8 !important;
    opacity: 0.7;
    cursor: not-allowed;
}

.dashboard-content {
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
    padding: 28px;
    min-height: 400px;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.dashboard-footer {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid rgba(241, 245, 249, 1);
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}

.dashboard-footer a {
    color: #3b82f6;
    font-weight: 600;
}

.dashboard-footer a:hover {
    text-decoration: underline;
}

/* Progress bar detailing */
.progress-container {
    margin-top: 14px;
}

.progress-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.progress-title {
    font-weight: 600;
    font-size: 13px;
    color: #475569;
}

.progress-count {
    font-weight: 700;
    font-size: 13px;
    color: #0f172a;
}

.progress-wrapper {
    height: 6px;
    background: #f1f5f9;
    border-radius: 100px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 100px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-fill-blue { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.progress-fill-green { background: linear-gradient(90deg, #10b981, #34d399); }
.progress-fill-purple { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.progress-fill-amber { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

/* Responsive */
@media (max-width: 992px) {
    .dashboard-body {
        grid-template-columns: 1fr;
        padding: 16px;
        gap: 16px;
    }
    .dashboard-sidebar {
        position: static;
        order: 2;
    }
    .detail-grid {
        grid-template-columns: 1fr;
    }
    .page-header {
        flex-direction: column;
        align-items: stretch;
    }
}
