/* style.css */

:root {
    /* Safe, local system fonts that require zero downloading */
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    
    /* Modern Mixed Theme Canvas Palette Variables */
    --bg-main: #f8fafc;         
    --bg-header: #0a2540;       
    --bg-card: #041d37;         
    --text-on-dark: #ffffff;    
    --text-on-light: #0f172a;   
    --text-muted: #94a3b8;      
    --text-card-muted: #a3c2e0; 
    
    --primary-blue: #2563eb;
    --primary-blue-hover: #1d4ed8;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-on-light);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh; /* Fixed vi syntax typo */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.flex-grow {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Global Container Width Control Metrics */
.max-w-7xl { width: 100%; max-width: 80rem; margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }
.max-w-5xl { width: 100%; max-width: 64rem; margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }
.max-w-4xl { width: 100%; max-width: 56rem; margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }
.max-w-3xl { width: 100%; max-width: 48rem; margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }
.max-w-2xl { width: 100%; max-width: 42rem; margin-left: auto; margin-right: auto; }
.max-w-md  { width: 100%; max-width: 28rem; margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }

/* Dynamic Header Structural Design */
.app-header {
    background-color: var(--bg-header);
    color: var(--text-on-dark);
    height: 4.5rem;          /* Forces the navbar to stay exactly this height */
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; 
    gap: 1rem;
    height: 100%;            /* Fills the fixed header space perfectly */
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}
.brand-link img { 
    width: auto; 
    height: 6rem;          /* Your desired larger logo size */
    margin-top: -0.5rem;     /* Pulls the image slightly upward */
    margin-bottom: -0.5rem;  /* Pulls the image slightly downward */
}
.brand-text { display: flex; flex-direction: column; }
.brand-text span:first-child { font-weight: 800; font-size: 1.50rem; letter-spacing: -0.025em; line-height: 1.1; }
.brand-sub { font-size: 0.7rem; color: #93c5fd; font-weight: 500; letter-spacing: 0.05em; }

header nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap; /* Wraps items cleanly on smaller dimensions */
    font-size: 0.9rem;
}
header nav a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}
header nav a:hover { color: #ffffff; }

.nav-admin { color: #93c5fd !important; font-weight: 600 !important; }
.nav-super { color: #c084fc !important; font-weight: 600 !important; }
.nav-user { color: #f1f5f9; font-size: 0.85rem; }
.nav-split { color: #334155; }

.btn-signin {
    background-color: var(--primary-blue);
    color: white !important;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600 !important;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
    transition: background 0.15s ease;
}
.btn-signin:hover { background-color: var(--primary-blue-hover); }

/* Unified Hero Banner Design Layout */
.hero-section {
    background: radial-gradient(circle at top right, #0d325c 0%, #051628 100%);
    color: white;
    text-align: center;
    padding: 4rem 1rem;
}
.hero-section h1 { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 0.75rem; }
.hero-section p { color: #93c5fd; font-size: 1.1rem; margin: 0 0 2.5rem; }

/* Fluid Responsive Search Matrix Components */
.search-container {
    position: relative;
    margin-bottom: 2rem;
    width: 100%;
}
.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    color: #94a3b8;
}
.search-container input {
    width: 100%;
    padding: 1rem 1rem 1rem 3.2rem !important;
    border-radius: 9999px !important;
    font-size: 1.05rem;
    border: 2px solid #1e293b !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}
.search-container input:focus { outline: none; border-color: var(--primary-blue) !important; }

.category-flex {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap; /* Fluid layout for categories row wrap */
}
.category-pill {
    background-color: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}
.category-pill:hover { background-color: rgba(255, 255, 255, 0.1); color: #fff; }

/* Main Content Adaptive Grid Space Frame */
.main-content { padding-top: 2.5rem; padding-bottom: 4rem; width: 100%; }
.main-content h2 { font-size: 1.5rem; font-weight: 700; color: var(--text-on-light); margin-bottom: 1.5rem; }

.grid-cols {
    display: grid;
    grid-template-columns: 1fr; /* Default mobile scale fallback stack */
    gap: 1.5rem;
}
@media (min-width: 640px) { .grid-cols { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-cols { grid-template-columns: repeat(3, 1fr); } }

/* Flat Surface Item Document Information Cards */
.item-card {
    background-color: var(--bg-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 1rem;
    color: var(--text-on-dark);
    box-shadow: 0 10px 25px -5px rgba(4, 29, 55, 0.15);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(4, 29, 55, 0.3);
}

.item-card h3 { color: var(--text-on-dark) !important; font-size: 1.2rem; margin: 0.75rem 0 0.5rem; font-weight: 700; }
.item-card p { color: var(--text-card-muted) !important; font-size: 0.875rem; margin: 0; line-height: 1.5; }

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

input, select, textarea {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.9rem;
    width: 100%;
}

.card-header { display: flex; justify-content: space-between; align-items: center; }
.tag-cat { background-color: rgba(59, 130, 246, 0.15); color: #60a5fa; font-size: 0.75rem; font-weight: 600; padding: 0.25rem 0.6rem; border-radius: 0.25rem; }
.tag-status { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #10b981; }

.card-footer { border-top: 1px solid rgba(255, 255, 255, 0.08); margin-top: 1.25rem; padding-top: 1rem; font-size: 0.8rem; color: #94a3b8; display: flex; flex-direction: column; gap: 0.35rem; }
.fee-text { font-weight: 600; color: #60a5fa; font-size: 0.85rem; margin-top: 0.25rem; }

/* Detail Interface View Matrices */
.back-link { display: inline-block; color: #475569; text-decoration: none; font-size: 0.9rem; font-weight: 500; margin-bottom: 1.5rem; }
.back-link:hover { color: var(--text-on-light); }
.detail-card { cursor: default; padding: 2.5rem; }
.detail-card:hover { transform: none; box-shadow: 0 10px 25px -5px rgba(4, 29, 55, 0.15); }
.detail-card h1 { font-size: 2rem; font-weight: 800; margin: 1rem 0; letter-spacing: -0.025em; }
.detail-card p { font-size: 1.05rem; line-height: 1.6; margin-bottom: 2rem; color: #cbd5e1 !important; }

.info-row { display: flex; justify-content: space-between; padding: 0.75rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); font-size: 0.95rem; }
.info-row span:first-child { color: #94a3b8; }
.info-row span:last-child { font-weight: 600; }
.fee-highlight { color: #3b82f6; font-size: 1.15rem; }

.btn-claim {
    display: block;
    text-align: center;
    background-color: var(--primary-blue);
    color: white;
    text-decoration: none;
    padding: 0.85rem;
    border-radius: 0.5rem;
    font-weight: 700;
    margin-top: 2rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transition: background 0.15s ease;
}
.btn-claim:hover { background-color: var(--primary-blue-hover); }

/* Authentication Box & Layout Components */
.auth-box { background: white; border: 1px solid #e2e8f0; border-radius: 1rem; padding: 2rem; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); margin-top: 4rem; margin-bottom: 4rem; }
.auth-box h2 { text-align: center; font-weight: 800; font-size: 1.5rem; margin: 0 0 0.25rem; color: #0f172a; }
.auth-box p { text-align: center; color: #64748b; font-size: 0.9rem; margin: 0 0 1.5rem; }

.auth-tabs { display: flex; background-color: #f1f5f9; padding: 0.25rem; border-radius: 0.5rem; margin-bottom: 1.5rem; }
.auth-tabs button { flex: 1; border: none; padding: 0.5rem; font-size: 0.875rem; font-weight: 600; border-radius: 0.375rem; color: #64748b; background: transparent; cursor: pointer; }
.auth-tabs button.active { background: white; color: #0f172a; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

.form-group { margin-bottom: 1.25rem; width: 100%; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: #475569; margin-bottom: 0.35rem; }
.btn-submit { background-color: #0f172a; color: white; border: none; padding: 0.65rem; border-radius: 0.375rem; font-weight: 600; width: 100%; cursor: pointer; margin-top: 0.5rem; }
.btn-submit:hover { background-color: #1e293b; }

.hidden { display: none !important; }
.alert-error { background-color: #fef2f2; border: 1px solid #fecaca; color: #991b1b; padding: 0.75rem; border-radius: 0.5rem; font-size: 0.85rem; font-weight: 500; margin-bottom: 1rem; text-align: center; }

/* MTN Mobile Money checkout Panel Configurations */
.momo-banner { background-color: #ffcc00; padding: 1.25rem; border-radius: 1rem 1rem 0 0; display: flex; align-items: center; gap: 1rem; color: #000; margin-top: 4rem; }
.momo-banner img { height: 2.5rem; width: auto; border-radius: 0.375rem; }
.momo-banner h4 { margin: 0; font-weight: 800; font-size: 1.05rem; }
.momo-body { background: white; border: 1px solid #e2e8f0; border-top: none; border-radius: 0 0 1rem 1rem; padding: 2rem; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); margin-bottom: 4rem; }
.momo-amount-title { text-align: center; color: #64748b; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; margin: 0 0 0.25rem; }
.momo-amount { text-align: center; font-size: 2.25rem; font-weight: 900; color: #0f172a; margin: 0 0 0.5rem; }
.momo-item-desc { text-align: center; font-size: 0.85rem; color: #475569; margin: 0 0 2rem; border-bottom: 1px dashed #cbd5e1; padding-bottom: 1rem; }

.terms-label { display: flex; gap: 0.75rem; align-items: flex-start; cursor: pointer; margin-top: 1.5rem; margin-bottom: 1.5rem; }
.terms-label input { width: auto; margin-top: 0.2rem; }
.terms-label span { font-size: 0.75rem; color: #64748b; line-height: 1.4; }

.btn-momo { background-color: #ffcc00; color: #000; border: none; font-weight: 800; font-size: 1rem; padding: 0.85rem; border-radius: 0.5rem; width: 100%; cursor: pointer; box-shadow: 0 4px 6px rgba(255, 204, 0, 0.2); }
.btn-momo:hover { background-color: #e6b800; }

/* Checkout Remittance Success Box Components */
.success-box { text-align: center; }
.success-badge { width: 3.5rem; height: 3.5rem; background-color: #dcfce7; color: #15803d; font-size: 1.75rem; font-weight: bold; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.25rem; }
.success-box h2 { color: #0f172a; margin-bottom: 0.5rem; }
.success-box p { color: #64748b; font-size: 0.9rem; line-height: 1.5; margin-bottom: 1.75rem; }

.ref-card { background-color: #f8fafc; border: 2px dashed #cbd5e1; border-radius: 0.75rem; padding: 1rem; margin-bottom: 1.5rem; display: flex; flex-direction: column; gap: 0.25rem; }
.ref-card span:first-child { font-size: 0.75rem; text-transform: uppercase; font-weight: 700; color: #94a3b8; letter-spacing: 0.05em; }
.ref-code { font-family: monospace; font-size: 1.5rem; font-weight: 700; color: #0f172a; }

.success-details { border-top: 1px solid #e2e8f0; padding-top: 1rem; margin-bottom: 2rem; display: flex; flex-direction: column; gap: 0.5rem; text-align: left; font-size: 0.85rem; }
.success-details div { display: flex; justify-content: space-between; }
.success-details span { color: #64748b; }
.return-home { display: block; background-color: #f1f5f9; color: #334155; font-weight: 600; text-decoration: none; padding: 0.65rem; border-radius: 0.375rem; font-size: 0.9rem; }
.return-home:hover { background-color: #e2e8f0; }

/* Admin Management Console Command Dashboard Area Grid layout */
.admin-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 1024px) { .admin-grid { grid-template-columns: 1.2fr 2fr; } }
.admin-card-bg { background-color: white; border: 1px solid #e2e8f0; border-radius: 1rem; padding: 1.75rem; box-shadow: 0 1px 3px rgba(0,0,0,0.02); height: max-content; }
.admin-card-bg h3 { margin-top: 0; font-size: 1.15rem; font-weight: 700; color: #0f172a; margin-bottom: 1.25rem; }

.form-grid-2 { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 0.5rem; }
@media (min-width: 480px) { .form-grid-2 { grid-template-columns: 1fr 1fr; } }

.table-wrapper { 
    background-color: white; 
    border: 1px solid #e2e8f0; 
    border-radius: 1rem; 
    padding: 1.5rem; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.02); 
    margin-bottom: 1.5rem;
    width: 100%;
    overflow-x: auto; /* Dynamic viewport sliding table control on mobile displays */
}
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.85rem; min-width: 500px; }
table th { padding: 0.75rem 1rem; border-bottom: 2px solid #f1f5f9; color: #475569; font-weight: 600; }
table td { padding: 0.75rem 1rem; border-bottom: 1px solid #f1f5f9; color: #334155; vertical-align: middle; }
.td-title { font-weight: 600; color: #0f172a; }
.td-fee { font-family: monospace; font-weight: 600; }
.td-ref { font-family: monospace; font-weight: 700; color: #2563eb; }

.status-pill { padding: 0.2rem 0.5rem; border-radius: 9999px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.status-pill.avail { background-color: #dcfce7; color: #16a34a; }
.status-pill.claim { background-color: #fee2e2; color: #dc2626; }

/* Superuser Accounts Control Settings Grid Matrix layout */
.super-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .super-grid { grid-template-columns: 1fr 1.2fr; } }
.admin-team-row { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 0; border-bottom: 1px solid #f1f5f9; font-size: 0.85rem; gap: 0.5rem; }
.admin-team-row div { line-height: 1.4; }
.admin-team-row span { color: #64748b; }
.admin-team-row .scope { background-color: #f1f5f9; color: #334155; font-weight: 600; padding: 0.15rem 0.4rem; border-radius: 0.25rem; font-size: 0.75rem; }
.btn-remove { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; padding: 0.25rem 0.6rem; border-radius: 0.375rem; font-size: 0.75rem; font-weight: 600; cursor: pointer; flex-shrink: 0; }
.btn-remove:hover { background: #fee2e2; }

/* Persistent Footer Area */
.app-footer {
    background-color: #031426;
    color: #bfdbfe;
    font-size: 0.75rem;
    padding: 3rem 1.5rem;
    margin-top: auto;
    width: 100%;
}
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }

.footer-grid h4 { color: #fff; font-weight: 700; font-size: 0.875rem; margin: 0 0 0.75rem; }
.footer-grid h5 { color: #fff; font-weight: 600; margin: 0.5rem 0 0.25rem; }
.footer-grid p { line-height: 1.5; margin: 0 0 0.75rem; }
.footer-grid ul { list-style-type: disc; padding-left: 1rem; margin: 0; }
.footer-grid li { margin-bottom: 0.25rem; }

.footer-legal-frame { display: grid; grid-template-columns: 1fr; gap: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.08); margin-top: 2.5rem; padding-top: 2rem; }
@media (min-width: 768px) { .footer-legal-frame { grid-template-columns: 1fr 1fr; } }
.legal-card h5 { margin-top: 0; color: #93c5fd; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.legal-card p { margin: 0; line-height: 1.5; color: #a3c2e0; }

.footer-copyright { text-align: center; border-top: 1px solid rgba(255, 255, 255, 0.08); margin-top: 2.5rem; padding-top: 1.5rem; color: #64748b; font-size: 0.7rem; letter-spacing: 0.02em; }