﻿/* ---- Azure Inspired Admin Theme ---- */

/* Colors */
:root {
    --azure-primary: #0f6cbd;
    --azure-primary-light: #e8f3ff;
    --azure-border: #d5dce3;
    --azure-bg: #f5f7fa;
    --azure-card-bg: #ffffff;
    --azure-text: #2a2f35;
}

/* Background */
body {
    background-color: var(--azure-bg) !important;
    font-family: "Segoe UI", sans-serif;
}

/* Top Navbar */
.navbar {
    background: #ffffff !important;
    border-bottom: 1px solid var(--azure-border);
    height: 60px;
}

.navbar-brand img {
    height: 36px;
}

/* Global SuperAdmin tenant context: centered on desktop, full-width below the
   primary header row on smaller screens. */
.portal-topnav {
    position: relative;
}

.global-tenant-context {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

@media (max-width: 991.98px) {
    .portal-topnav.navbar {
        height: auto;
        min-height: 60px;
    }

    .portal-topnav > .container-fluid {
        flex-wrap: wrap;
        padding-top: 10px;
    }

    .global-tenant-context {
        position: static;
        order: 3;
        flex: 0 0 100%;
        width: 100%;
        transform: none;
        margin-top: 10px;
        padding: 10px 0;
        border-top: 1px solid var(--azure-border);
    }

    .global-tenant-context form {
        width: 100%;
    }

    .global-tenant-context select {
        flex: 1 1 auto;
        min-width: 0 !important;
        width: 100%;
    }

    .portal-topnav .dropdown > a span {
        max-width: 130px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Cards */
.azure-card {
    background: var(--azure-card-bg);
    border: 1px solid var(--azure-border);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
}

    .azure-card:hover {
        box-shadow: 0 3px 8px rgba(0,0,0,0.15);
        transform: translateY(-2px);
    }

    .azure-card h5 {
        font-weight: 600;
        margin-bottom: 10px;
    }

/* Buttons */
.btn-azure {
    background: var(--azure-primary);
    color: white;
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 500;
    border: none;
}

    .btn-azure:hover {
        background: #0a5391;
        color: #fff;
    }

/* Section Header */
.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 15px;
    color: var(--azure-text);
}

/* Grid spacing */
.dashboard-grid {
    margin-top: 20px;
}

.card-text {
    color: #4c535a;
}

/* Dashboard launchpad */
.dashboard-launchpad { padding-top: 2rem; padding-bottom: 3rem; }

.dashboard-hero {
    display: flex; align-items: center; justify-content: space-between; gap: 2rem;
    padding: 1.75rem 2rem; color: #fff;
    background: linear-gradient(120deg, #0b4f88 0%, #0f6cbd 58%, #2786cf 100%);
    border-radius: 14px; box-shadow: 0 8px 24px rgba(15, 108, 189, .18);
}

.dashboard-eyebrow {
    margin-bottom: .35rem; font-size: .72rem; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase; opacity: .78;
}

.dashboard-hero h1 {
    margin: 0; font-size: clamp(1.55rem, 3vw, 2.1rem);
    font-weight: 650; letter-spacing: -.025em;
}

.dashboard-hero p { margin: .45rem 0 0; color: rgba(255, 255, 255, .82); }

.dashboard-context {
    display: flex; align-items: center; flex: 0 0 auto; gap: .75rem; min-width: 190px;
    padding: .75rem 1rem; background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2); border-radius: 10px;
    backdrop-filter: blur(5px);
}

.dashboard-context > i { font-size: 1.3rem; }
.dashboard-context span { display: flex; min-width: 0; flex-direction: column; }
.dashboard-context small { color: rgba(255, 255, 255, .7); font-size: .7rem; text-transform: uppercase; }
.dashboard-context strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dashboard-section { margin-top: 2.25rem; }
.dashboard-section-heading {
    display: flex; align-items: end; justify-content: space-between;
    gap: 1rem; margin-bottom: 1rem;
}
.dashboard-section-heading h2 { margin: 0; color: #20252b; font-size: 1.2rem; font-weight: 650; }
.dashboard-section-heading p { margin: .2rem 0 0; color: #66717d; font-size: .875rem; }

.dashboard-tile-grid { display: grid; gap: 1rem; }
.dashboard-management-grid, .dashboard-service-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.dashboard-tile, .dashboard-service-tile {
    position: relative; display: flex; min-width: 0; gap: .9rem; padding: 1rem;
    color: var(--azure-text); background: #fff; border: 1px solid #dfe4ea;
    border-radius: 10px; box-shadow: 0 1px 2px rgba(17, 24, 39, .04);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.dashboard-tile-link, .dashboard-service-tile { text-decoration: none; }
.dashboard-tile-link:hover, .dashboard-service-tile:hover {
    color: var(--azure-text); border-color: #86b9e3;
    box-shadow: 0 6px 18px rgba(24, 55, 85, .09); transform: translateY(-2px);
}

.dashboard-tile-icon, .dashboard-service-icon {
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 42px; width: 42px; height: 42px; font-size: 1.15rem; border-radius: 9px;
}

.dashboard-icon-blue { color: #0f6cbd; background: #e8f3ff; }
.dashboard-icon-violet { color: #6b4fb3; background: #f1ecff; }
.dashboard-icon-green { color: #287a55; background: #e7f6ee; }
.dashboard-icon-orange { color: #a15c10; background: #fff1df; }

.dashboard-tile-content, .dashboard-service-content {
    display: flex; min-width: 0; flex: 1 1 auto; flex-direction: column;
}
.dashboard-tile-content strong, .dashboard-service-content strong { font-size: .98rem; font-weight: 650; }
.dashboard-tile-content small, .dashboard-service-content small {
    display: -webkit-box; overflow: hidden; margin-top: .25rem;
    color: #66717d; font-size: .79rem; line-height: 1.35;
    -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}

.dashboard-tile-arrow { flex: 0 0 auto; align-self: center; color: #8a96a3; font-size: .9rem; }
.dashboard-inline-links { display: flex; flex-wrap: wrap; gap: .3rem .75rem; margin-top: .55rem; }
.dashboard-inline-links a { color: var(--azure-primary); font-size: .75rem; font-weight: 600; text-decoration: none; }
.dashboard-inline-links a:hover { text-decoration: underline; }

.dashboard-search {
    display: flex; align-items: center; gap: .5rem; width: min(260px, 100%);
    padding: .55rem .75rem; color: #68737e; background: #fff;
    border: 1px solid #d5dce3; border-radius: 8px;
}
.dashboard-search:focus-within { border-color: var(--azure-primary); box-shadow: 0 0 0 3px rgba(15, 108, 189, .12); }
.dashboard-search input {
    width: 100%; min-width: 0; padding: 0; background: transparent;
    border: 0; outline: 0; font-size: .875rem;
}

.dashboard-service-tile { min-height: 112px; }
.dashboard-service-icon { color: var(--azure-primary); background: var(--azure-primary-light); }
.dashboard-service-dates { margin-top: auto; padding-top: .4rem; color: #7b858f; font-size: .7rem; }
.dashboard-service-tile.is-unavailable { cursor: not-allowed; opacity: .58; pointer-events: none; }

.dashboard-empty-state {
    display: flex; align-items: center; justify-content: center; min-height: 170px;
    flex-direction: column; padding: 2rem; color: #68737e; text-align: center;
    background: #fff; border: 1px dashed #cbd3dc; border-radius: 10px;
}
.dashboard-empty-state > i { margin-bottom: .65rem; color: #8ea3b7; font-size: 1.7rem; }
.dashboard-empty-state strong { margin-bottom: .25rem; color: #343a40; }
.dashboard-empty-state span { font-size: .875rem; }

@media (max-width: 1199.98px) {
    .dashboard-management-grid, .dashboard-service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
    .dashboard-launchpad { padding-top: 1rem; }
    .dashboard-hero { align-items: stretch; flex-direction: column; gap: 1.25rem; padding: 1.35rem; }
    .dashboard-context { min-width: 0; }
    .dashboard-section { margin-top: 1.75rem; }
    .dashboard-services-heading { align-items: stretch; flex-direction: column; }
    .dashboard-search { width: 100%; }
}

@media (max-width: 575.98px) {
    .dashboard-management-grid, .dashboard-service-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-tile, .dashboard-service-tile { transition: none; }
}
