﻿/* =========================
   UniversityResourcesSystem - Modern RTL Layout
   File: wwwroot/css/ur-modern.css
   ========================= */

/* ---------- Tokens ---------- */
:root {
    --brand: #4f46e5;
    --brand-2: #6366f1;
    --accent: #f97316;
    --bg: #f5f7ff;
    --surface: #ffffff;
    --surface-2: #fbfbff;
    --text: #111827;
    --muted: #6b7280;
    --muted-2: #94a3b8;
    --border: rgba(15, 23, 42, 0.10);
    --border-strong: rgba(15, 23, 42, 0.14);
    --shadow: 0 14px 35px rgba(15, 23, 42, 0.10);
    --shadow-2: 0 10px 20px rgba(15, 23, 42, 0.10);
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 12px;
    --sidebar-w: 260px;
    --topbar-h: 70px;
    --chip: rgba(79, 70, 229, 0.10);
    --chip-text: #3f3fe0;
    --warn: #f59e0b;
    --danger: #ef4444;
    --success: #22c55e;
    --info: #0ea5e9;
    --grad-hero: radial-gradient(1200px circle at 85% -20%, rgba(79,70,229,0.22), transparent 55%), radial-gradient(900px circle at 10% 0%, rgba(249,115,22,0.16), transparent 52%), linear-gradient(180deg, #f7f8ff 0%, #f3f6ff 100%);
}

/* ---------- Base ---------- */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Cairo', system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    background: var(--grad-hero);
    color: var(--text);
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

button {
    font-family: inherit;
}

::selection {
    background: rgba(79,70,229,0.18);
}

/* ---------- Helpers ---------- */
.ur-hidden {
    display: none !important;
}

.ur-flex {
    display: flex;
    align-items: center;
}

.ur-gap-8 {
    gap: 8px;
}

.ur-gap-10 {
    gap: 10px;
}

.ur-muted {
    color: var(--muted);
}

.ur-small {
    font-size: 0.85rem;
}

.ur-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.82rem;
}

.ur-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--chip);
    color: var(--chip-text);
    border: 1px solid rgba(79,70,229,0.15);
    font-size: 0.85rem;
    font-weight: 700;
}

/* ---------- Layout Shell ---------- */
.ur-shell {
    min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.ur-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px);
    border-left: 1px solid var(--border);
    box-shadow: -10px 0 28px rgba(15, 23, 42, 0.08);
    z-index: 1001;
    display: flex;
    flex-direction: column;
}

.ur-sidebar-head {
    height: var(--topbar-h);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(79,70,229,0.06), transparent 70%);
}

.ur-brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 12px 25px rgba(79,70,229,0.30);
}

.ur-brand-title {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

    .ur-brand-title strong {
        font-size: 1.02rem;
        letter-spacing: 0.1px;
    }

    .ur-brand-title span {
        font-size: 0.78rem;
        color: var(--muted);
    }

.ur-sidebar-body {
    padding: 14px 10px 16px;
    overflow: auto;
}

    .ur-sidebar-body::-webkit-scrollbar {
        width: 6px;
    }

    .ur-sidebar-body::-webkit-scrollbar-thumb {
        background: rgba(148,163,184,0.65);
        border-radius: 999px;
    }

.ur-menu-title {
    font-size: 0.78rem;
    padding: 14px 14px 6px;
    color: var(--muted-2);
    font-weight: 800;
    letter-spacing: .3px;
}

.ur-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin: 4px 8px;
    border-radius: 14px;
    color: var(--text);
    border: 1px solid transparent;
    transition: transform .12s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
    position: relative;
}

    .ur-link i {
        width: 24px;
        text-align: center;
        color: var(--muted-2);
        font-size: 1.02rem;
    }

    .ur-link:hover {
        background: rgba(79,70,229,0.09);
        border-color: rgba(79,70,229,0.16);
        transform: translateY(-1px);
    }

        .ur-link:hover i {
            color: var(--brand);
        }

    .ur-link.active {
        background: linear-gradient(135deg, var(--brand), var(--brand-2));
        color: #fff;
        border-color: rgba(255,255,255,0.25);
        box-shadow: 0 14px 26px rgba(79,70,229,0.28);
    }

        .ur-link.active i {
            color: #fff;
        }

        .ur-link.active::before {
            content: "";
            position: absolute;
            right: 6px;
            top: 50%;
            transform: translateY(-50%);
            width: 5px;
            height: 70%;
            border-radius: 999px;
            background: linear-gradient(180deg, #fde68a, var(--accent));
        }

/* Search in sidebar */
.ur-search {
    padding: 8px 10px 12px;
}

    .ur-search .ur-search-box {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 9px 12px;
        border-radius: 14px;
        border: 1px solid var(--border);
        background: rgba(255,255,255,0.85);
    }

        .ur-search .ur-search-box i {
            color: var(--muted-2);
        }

    .ur-search input {
        width: 100%;
        border: 0;
        outline: 0;
        background: transparent;
        font-size: 0.92rem;
        color: var(--text);
    }

        .ur-search input::placeholder {
            color: var(--muted-2);
        }

/* ---------- Topbar ---------- */
.ur-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: var(--sidebar-w);
    height: var(--topbar-h);
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
}

.ur-topbar-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .ur-topbar-left .ur-page-title {
        font-weight: 900;
        font-size: 1.05rem;
        display: inline-flex;
        align-items: center;
        gap: 10px;
    }

    .ur-topbar-left .ur-page-subtitle {
        font-size: 0.80rem;
        color: var(--muted);
    }

.ur-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ur-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(249,250,251,0.9);
    display: grid;
    place-items: center;
    cursor: pointer;
    color: var(--muted);
    transition: transform .12s ease, box-shadow .18s ease, border-color .18s ease;
}

    .ur-icon-btn:hover {
        transform: translateY(-1px);
        border-color: rgba(79,70,229,0.25);
        box-shadow: var(--shadow-2);
        color: var(--brand);
    }

.ur-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(79,70,229,0.18);
    background: rgba(79,70,229,0.08);
}

.ur-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 14px 26px rgba(79,70,229,0.25);
}

.ur-user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

    .ur-user-meta strong {
        font-size: 0.88rem;
    }

    .ur-user-meta span {
        font-size: 0.75rem;
        color: var(--muted);
    }

/* ---------- Main ---------- */
.ur-main {
    margin-right: var(--sidebar-w);
    padding-top: calc(var(--topbar-h) + 18px);
    padding-left: 18px;
    padding-right: 18px;
    padding-bottom: 22px;
}

.ur-container {
    background: rgba(255,255,255,0.85);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 18px;
}

    /* ---------- Content styling (tables/cards) ---------- */
    .ur-container .card,
    .ur-container .table,
    .ur-container .alert {
        border-radius: var(--radius-md);
    }

.table {
    border-color: rgba(15,23,42,0.10) !important;
}

    .table thead th {
        font-weight: 900;
        color: #111827;
        background: rgba(15,23,42,0.03);
        border-color: rgba(15,23,42,0.10) !important;
        white-space: nowrap;
    }

    .table tbody td {
        border-color: rgba(15,23,42,0.08) !important;
        vertical-align: middle;
    }

.table-hover tbody tr:hover {
    background: rgba(79,70,229,0.06) !important;
}

.btn {
    border-radius: 12px;
    font-weight: 800;
}

/* ==========================================================
   ✅ Dashboard / KPI / Sections (The missing part)
   ========================================================== */

/* Grid helpers */
.ur-grid {
    display: grid;
    gap: 12px;
}

    .ur-grid.kpi {
        grid-template-columns: repeat(12, 1fr);
    }

/* columns */
.ur-col-3 {
    grid-column: span 3;
}

.ur-col-4 {
    grid-column: span 4;
}

.ur-col-6 {
    grid-column: span 6;
}

.ur-col-8 {
    grid-column: span 8;
}

.ur-col-12 {
    grid-column: span 12;
}

/* KPI Card */
.ur-kpi-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.92);
    box-shadow: var(--shadow-2);
    padding: 14px 14px 12px;
    min-height: 108px;
}

    .ur-kpi-card::after {
        content: "";
        position: absolute;
        width: 220px;
        height: 220px;
        left: -110px;
        top: -120px;
        border-radius: 999px;
        background: radial-gradient(circle at 30% 30%, rgba(79,70,229,0.22), transparent 60%);
        pointer-events: none;
    }

.ur-kpi-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.ur-kpi-title {
    font-size: 0.86rem;
    color: var(--muted);
    font-weight: 800;
}

.ur-kpi-value {
    font-size: 1.60rem;
    font-weight: 900;
    letter-spacing: .3px;
    margin-top: 6px;
}

.ur-kpi-meta {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 0.80rem;
}

.ur-kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(79,70,229,0.16);
    background: rgba(79,70,229,0.10);
    color: var(--brand);
}

    .ur-kpi-icon.orange {
        border-color: rgba(249,115,22,0.20);
        background: rgba(249,115,22,0.12);
        color: var(--accent);
    }

    .ur-kpi-icon.green {
        border-color: rgba(34,197,94,0.20);
        background: rgba(34,197,94,0.12);
        color: var(--success);
    }

    .ur-kpi-icon.red {
        border-color: rgba(239,68,68,0.20);
        background: rgba(239,68,68,0.12);
        color: var(--danger);
    }

/* Trend pill */
.ur-trend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    font-weight: 800;
}

    .ur-trend.up {
        color: var(--success);
        border-color: rgba(34,197,94,0.25);
        background: rgba(34,197,94,0.10);
    }

    .ur-trend.down {
        color: var(--danger);
        border-color: rgba(239,68,68,0.25);
        background: rgba(239,68,68,0.10);
    }

    .ur-trend.neutral {
        color: var(--muted);
    }

/* Sections */
.ur-section {
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.90);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2);
    overflow: hidden;
}

.ur-section-head {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid var(--border);
}

.ur-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
}

    .ur-section-title i {
        color: var(--brand);
    }

.ur-section-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ur-section-body {
    padding: 12px 14px;
}

/* Chart box */
.ur-chart {
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.72);
    border-radius: 16px;
    padding: 10px;
}

/* Filters row */
.ur-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

    .ur-filters .form-select,
    .ur-filters .form-control {
        min-width: 190px;
    }

/* Table wrap */
.ur-table-wrap {
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

    .ur-table-wrap .table {
        margin: 0;
    }

/* ---------- Mobile / Responsive ---------- */
.ur-mobile-toggle {
    display: none;
}

@media (max-width: 1200px) {
    .ur-col-3 {
        grid-column: span 6;
    }

    .ur-col-4 {
        grid-column: span 6;
    }
}

@media (max-width: 768px) {
    .ur-col-3, .ur-col-4, .ur-col-6, .ur-col-8 {
        grid-column: span 12;
    }

    .ur-kpi-value {
        font-size: 1.40rem;
    }
}

@media (max-width: 992px) {
    :root {
        --sidebar-w: 0px;
    }

    .ur-topbar {
        right: 0;
    }

    .ur-sidebar {
        transform: translateX(110%);
        transition: transform .22s ease;
        width: 280px;
    }

        .ur-sidebar.is-open {
            transform: translateX(0);
        }

    .ur-main {
        margin-right: 0;
        padding-left: 12px;
        padding-right: 12px;
    }

    .ur-mobile-toggle {
        display: inline-grid;
    }

    .ur-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(2,6,23,0.35);
        backdrop-filter: blur(2px);
        z-index: 999;
        display: none;
    }

        .ur-backdrop.is-open {
            display: block;
        }
}

/* ---------- Print ---------- */
@media print {
    .ur-sidebar, .ur-topbar, .ur-backdrop {
        display: none !important;
    }

    .ur-main {
        margin: 0 !important;
        padding: 0 !important;
    }

    .ur-container {
        box-shadow: none !important;
        border: 0 !important;
    }
}
/* =========================
   FIX: Force cards to look like cards
   (for existing Home/Index that uses Bootstrap .card)
   ========================= */
.ur-container .card {
    background: rgba(255,255,255,0.92) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-2) !important;
    overflow: hidden;
}

    .ur-container .card .card-body {
        padding: 14px 14px 12px !important;
    }

    .ur-container .card .text-muted {
        color: var(--muted) !important;
        font-weight: 700;
    }

    .ur-container .card .fs-3,
    .ur-container .card .fw-bold {
        font-weight: 900 !important;
    }

    /* make card hover feel premium */
    .ur-container .card:hover {
        transform: translateY(-2px);
        transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
        border-color: rgba(79,70,229,0.20) !important;
        box-shadow: 0 18px 40px rgba(15,23,42,0.12) !important;
    }
/* ===== Page helpers ===== */
.ur-page-narrow {
    max-width: 700px;
}

/* ===== Access Denied ===== */
.ur-denied-card {
    padding: 22px 22px 26px;
}

.ur-denied-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.ur-denied-icon {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex: 0 0 auto;
    box-shadow: 0 10px 22px rgba(239,68,68,.22);
}

.ur-denied-title {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--text-main);
}

.ur-denied-subtitle {
    font-size: .85rem;
    color: var(--text-muted);
}

.ur-denied-actions {
    margin-top: 10px;
}


<style >
.ur-footer {
    margin-top: 18px;
    padding: 14px 18px;
    border-top: 1px solid rgba(255,255,255,.08);
    background: linear-gradient(180deg, rgba(17,24,39,.35), rgba(17,24,39,.65));
    backdrop-filter: blur(8px);
}

.ur-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    max-width: 1200px;
    margin: 0 auto;
}

.ur-footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: #fff;
    letter-spacing: .2px;
}

.ur-footer-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34,197,94,.15);
    display: inline-block;
}

.ur-footer-muted {
    font-weight: 600;
    opacity: .75;
}

.ur-footer-meta {
    margin-top: 6px;
    font-size: .9rem;
    opacity: .75;
    color: #fff;
}

.ur-sep {
    margin: 0 8px;
    opacity: .6;
}

.ur-footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ur-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    opacity: .9;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.03);
    transition: .2s ease;
    font-size: .92rem;
    white-space: nowrap;
}

    .ur-footer-link:hover {
        transform: translateY(-1px);
        opacity: 1;
        background: rgba(255,255,255,.06);
        border-color: rgba(255,255,255,.18);
    }

.ur-footer-copy {
    opacity: .7;
    font-size: .9rem;
    margin-inline-start: 6px;
    color: #fff;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .ur-footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .ur-footer-right {
        justify-content: flex-start;
    }
}

</style >
