/* ———————————————————————————————————————————————————————
   Legacy Intelligent System — Main Stylesheet
   Color Theme: Corporate Blue (#1a3a6b) and Teal (#0d9488)
   ——————————————————————————————————————————————————————— */

:root {
    --lis-blue:        #1a3a6b;
    --lis-blue-light:  #2a52a0;
    --lis-teal:        #0d9488;
    --lis-teal-light:  #14b8a6;
    --lis-hero-bg:     #dbeafe;   /* light blue */
    --lis-card-border: #e2e8f0;
    --lis-text-dark:   #1e293b;
    --lis-text-muted:  #64748b;
}

/* --- Global --- */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--lis-text-dark);
    background-color: #f8fafc;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Navbar --- */
.lis-navbar {
    background-color: var(--lis-blue) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 0.9rem 2.5rem;
}

/* Logo wrapper — white rounded pill with shadow so logo pops on dark navbar */
.lis-logo-wrap {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 5px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
    transition: box-shadow 0.2s ease;
}

.lis-logo-wrap:hover {
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.45);
}

.lis-logo-img {
    height: 46px;
    width: auto;
    object-fit: contain;
    display: block;
}

.lis-nav-link {
    color: rgba(255, 255, 255, 0.92) !important;
    border-radius: 6px;
    padding: 0.45rem 0.9rem !important;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.lis-nav-link:hover,
.lis-nav-link.active {
    background-color: var(--lis-teal) !important;
    color: #ffffff !important;
}

/* --- Hero Section --- */
.lis-hero {
    background-color: var(--lis-hero-bg);
    border-bottom: 1px solid #bfdbfe;
    min-height: 320px;
}

.lis-hero-logo {
    max-height: 100px;
    max-width: 280px;
    object-fit: contain;
}

.lis-hero-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--lis-blue);
}

.lis-hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--lis-text-muted);
    max-width: 680px;
    line-height: 1.6;
}

/* --- App Cards / Tiles --- */
.lis-apps-section {
    background-color: #f8fafc;
}

.lis-app-card {
    background: #ffffff;
    border: 1px solid var(--lis-card-border);
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease,
                border-color 0.25s ease, background-color 0.25s ease;
    cursor: pointer;
}

.lis-app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(13, 148, 136, 0.18);
    border-color: var(--lis-teal);
    background-color: #f0fdfa;
}

.lis-app-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--lis-blue), var(--lis-teal));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lis-app-icon .bi {
    font-size: 1.5rem;
    color: #ffffff;
}

.lis-app-card-title {
    color: var(--lis-blue);
    font-size: 1.05rem;
}

.lis-app-card-text {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* --- App Launch Button --- */
.lis-btn-app {
    background-color: var(--lis-blue);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0.55rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.25s ease, transform 0.15s ease;
}

.lis-btn-app:hover {
    background-color: var(--lis-teal);
    color: #ffffff;
    transform: translateY(-1px);
}

/* --- General Form Pages --- */
.lis-page-header {
    background: linear-gradient(135deg, var(--lis-blue), var(--lis-blue-light));
    color: #ffffff;
    padding: 2.5rem 0;
}

.lis-page-header h2 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
}

.lis-page-header p {
    opacity: 0.85;
    font-size: 1rem;
}

.lis-form-card {
    background: #ffffff;
    border: 1px solid var(--lis-card-border);
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    padding: 2rem;
}

.lis-section-label {
    color: var(--lis-blue);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--lis-teal);
    padding-bottom: 0.4rem;
    margin-bottom: 1rem;
}

.lis-btn-primary {
    background-color: var(--lis-blue);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0.65rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.25s ease;
}

.lis-btn-primary:hover {
    background-color: var(--lis-teal);
    color: #ffffff;
}

.lis-btn-download {
    background-color: var(--lis-teal);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0.65rem 1.5rem;
    font-weight: 600;
    transition: background-color 0.25s ease;
}

.lis-btn-download:hover {
    background-color: var(--lis-blue);
    color: #ffffff;
}

/* Attachment action buttons use lis-btn-app with inline width/height */

/* --- Loading Overlay --- */
#lis-loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26, 58, 107, 0.82);
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

#lis-loading-overlay.active {
    display: flex;
}

.lis-spinner {
    width: 56px;
    height: 56px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--lis-teal-light);
    border-radius: 50%;
    animation: lis-spin 0.9s linear infinite;
    margin-bottom: 1.25rem;
}

@keyframes lis-spin {
    to { transform: rotate(360deg); }
}

.lis-loading-text {
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    max-width: 320px;
    line-height: 1.5;
}

/* --- Results Page --- */
.lis-results-card {
    background: #ffffff;
    border: 1px solid var(--lis-card-border);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.lis-results-card table {
    width: 100%;
    min-width: 100%;
    font-size: 0.9rem;
    border-collapse: collapse;
    table-layout: auto;
}

.lis-results-card th,
.lis-results-card th * {
    background-color: var(--lis-blue) !important;
    color: #ffffff !important;
    font-weight: 700;
    padding: 0.65rem 0.9rem;
    border: 1px solid #1e3a8a;
    letter-spacing: 0.3px;
}

.lis-alert-red    { background-color: #fee2e2; color: #991b1b; }
.lis-alert-yellow { background-color: #fef9c3; color: #854d0e; }
.lis-alert-green  { background-color: #dcfce7; color: #166534; }

/* --- Footer --- */
.lis-footer {
    background-color: var(--lis-blue);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-top: auto;
}

/* --- Responsive Utilities --- */
@media (max-width: 576px) {
    .lis-hero {
        min-height: 260px;
        padding: 2rem 1rem;
    }
    .lis-form-card {
        padding: 1.25rem;
    }
    .lis-navbar {
        padding: 0.9rem 1rem;
    }
}
