﻿/* Set padding to keep content from hitting the edges */
.body-content {
    margin-top: 15px;
    padding-left: 15px;
    padding-right: 15px;
}

/* Override the default bootstrap behavior where horizontal description lists 
   will truncate terms that are too long to fit in the left column 
*/
.dl-horizontal dt {
    white-space: normal;
}

/* Set width on the form input elements since they're 100% wide by default */
input,
select,
textarea {
    max-width: 280px;
}
:root {
    --royal-blue: #002B5C;
    --royal-blue-hover: #003A7D;
    --royal-footer: #001A3A;
    --white: #FFFFFF;
    --bg-light: #F4F6F9;
    --text-dark: #111827;
    --text-muted: #6B7280;
    --border: #E5E7EB;
    --shadow: 0 4px 8px -2px rgba(0,0,0,0.08), 0 2px 6px -1px rgba(0,0,0,0.04);
    --radius: 10px;
    --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header & Footer */
header {
    background: var(--royal-blue);
    color: #fff;
    padding: 0.8rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1340px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.logo-icon {
    font-size: 1.8rem;
    text-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.logo-section h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fff;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 0.4rem;
}

nav a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-weight: 500;
    padding: 0.55rem 0.9rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.92rem;
}

    nav a:hover, nav a.active {
        background: var(--royal-blue-hover);
        color: #fff;
        box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    }

footer {
    background: var(--royal-footer);
    color: rgba(255,255,255,0.85);
    text-align: center;
    padding: 1.1rem 0;
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-container {
    max-width: 1340px;
    margin: 0 auto;
    padding: 0 2rem;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

/* Layout */
main.container {
    max-width: 1340px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-height: 70vh;
    width: calc(100% - 4rem);
}

.page-title {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--royal-blue);
    margin-bottom: 0.4rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.7rem;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.8rem;
    text-align: center;
}

/* Index Mosaic 4x2 */
.mosaic-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.4rem;
    padding: 0.5rem 0;
}

.mosaic-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.6rem 1.3rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.25s ease;
    border-top: 5px solid;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 180px;
    position: relative;
    overflow: hidden;
}

    .mosaic-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px -4px rgba(0,0,0,0.12);
    }

.icon-wrap {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
    background: rgba(255,255,255,0.7);
    border-radius: 50%;
    box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}

.mosaic-card h3 {
    font-size: 0.98rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.card-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.mosaic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.mosaic-card:hover::before {
    opacity: 1;
}

/* Card Top Colors */
.c1 {
    border-top-color: #10B981;
    background: linear-gradient(180deg,#F0FDF4 0%,#fff 100%);
}

.c2 {
    border-top-color: #3B82F6;
    background: linear-gradient(180deg,#EFF6FF 0%,#fff 100%);
}

.c3 {
    border-top-color: #F59E0B;
    background: linear-gradient(180deg,#FFFBEB 0%,#fff 100%);
}

.c4 {
    border-top-color: #EF4444;
    background: linear-gradient(180deg,#FEF2F2 0%,#fff 100%);
}

.c5 {
    border-top-color: #8B5CF6;
    background: linear-gradient(180deg,#F5F3FF 0%,#fff 100%);
}

.c6 {
    border-top-color: #6B7280;
    background: linear-gradient(180deg,#F9FAFB 0%,#fff 100%);
}

.c7 {
    border-top-color: #EC4899;
    background: linear-gradient(180deg,#FDF2F8 0%,#fff 100%);
}

.c8 {
    border-top-color: #14B8A6;
    background: linear-gradient(180deg,#F0FDFA 0%,#fff 100%);
}

/* Dashboard Grid & Cards */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.dash-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.15rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}

    .dash-card h3 {
        font-size: 0.92rem;
        color: var(--text-muted);
        margin-bottom: 0.75rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-weight: 600;
        border-bottom: 1px dashed var(--border);
        padding-bottom: 0.45rem;
    }

.indicator {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    border-bottom: 1px dashed var(--border);
    font-size: 0.86rem;
    align-items: center;
}

    .indicator span:last-child {
        font-weight: 600;
    }

.dot {
    height: 8px;
    width: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.g {
    background: #10B981;
}

.y {
    background: #F59E0B;
}

.r {
    background: #EF4444;
}

.o {
    background: #F97316;
}

.v {
    background: #8B5CF6;
}

.lv {
    background: #C084FC;
}

.b {
    background: #3B82F6;
}

.bar {
    height: 8px;
    background: #E5E7EB;
    border-radius: 4px;
    margin-top: 0.45rem;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.map-box {
    width: 100%;
    height: 150px;
    background: #F8FAFC;
    border: 2px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-radius: var(--radius);
    margin-bottom: 0.9rem;
    font-weight: 500;
    font-size: 0.82rem;
}

.alert {
    background: #FEF2F2;
    border-left: 4px solid #EF4444;
    padding: 0.75rem;
    margin: 0.45rem 0;
    border-radius: 4px;
    color: #991B1B;
    font-size: 0.84rem;
    font-weight: 500;
}

.warn {
    background: #FFFBEB;
    border-left: 4px solid #F59E0B;
    padding: 0.75rem;
    margin: 0.45rem 0;
    border-radius: 4px;
    color: #92400E;
    font-size: 0.84rem;
}

/* Chatbot */
.chatbot {
    background: #F8FAFC;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-top: 1.4rem;
}

    .chatbot h4 {
        margin-bottom: 0.55rem;
        color: var(--royal-blue);
        font-size: 0.92rem;
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }

.chat-msg {
    height: 95px;
    overflow-y: auto;
    margin-bottom: 0.5rem;
    padding: 0.65rem;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #E5E7EB;
    font-size: 0.84rem;
}

.chat-in {
    display: flex;
    gap: 0.5rem;
}

    .chat-in input {
        flex: 1;
        padding: 0.55rem;
        border: 1px solid var(--border);
        border-radius: 6px;
        outline: none;
        font-size: 0.88rem;
    }

    .chat-in button {
        background: var(--royal-blue);
        color: #fff;
        border: none;
        padding: 0.55rem 0.95rem;
        border-radius: 6px;
        cursor: pointer;
        font-weight: 500;
        transition: background 0.2s;
    }

        .chat-in button:hover {
            background: var(--royal-blue-hover);
        }

/* Responsive */
@media (max-width: 1100px) {
    .mosaic-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .header-container {
        flex-direction: column;
        gap: 0.6rem;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.3rem;
    }

    .mosaic-grid {
        grid-template-columns: 1fr;
    }

    main.container {
        padding: 1.1rem;
        width: calc(100% - 2.2rem);
    }
}