/* Custom styles for Dexterity - School Management System */

:root {
    /* G & N Missions Schools Brand Colors: Gold & Black */
    --dx-primary: #111111;           /* Black */
    --dx-primary-hover: #222222;     /* Dark Gray for hover */
    --dx-accent: #FFD700;            /* Gold */
    --dx-accent-light: #FFE34D;      /* Light Gold */
    
    --dx-bg: #FFFDF5;                /* Warm light background */
    --dx-surface: #FFFFFF;           /* Cards, panels */
    --dx-text: #1A1A1A;              /* Primary text */
    --dx-text-muted: #6B6B6B;        /* Secondary text */
    --dx-border: #E8DDBA;            /* Subtle warm border */
    
    --dx-success: #16A34A;
    --dx-warning: #F59E0B;
    --dx-danger: #EF4444;
    --dx-info: #0EA5E9;
    
    /* Legacy compatibility */
    --primary-color: #1E63FF;
    --secondary-color: #5AA7FF;
    --success-color: #16A34A;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    --info-color: #0EA5E9;
}

body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background-color: var(--dx-bg);
    color: var(--dx-text);
}

main {
    flex: 1 0 auto;
}

/* Cards */
.card {
    border-radius: 8px;
    transition: all 0.3s ease;
}

.card.hoverable:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 17px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
}

.card-title {
    font-weight: 500 !important;
}

/* Dashboard Cards */
.dashboard-card {
    text-align: center;
    padding: 20px;
}

.dashboard-card .card-title {
    font-size: 2.5rem;
    margin: 10px 0;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table.striped tbody tr:nth-child(odd) {
    background-color: #f5f5f5;
}

table.highlight tbody tr:hover {
    background-color: #e3f2fd;
}

/* Forms */
.input-field label {
    color: #616161;
}

.input-field input:focus + label,
.input-field textarea:focus + label {
    color: var(--primary-color) !important;
}

.input-field input:focus,
.input-field textarea:focus {
    border-bottom: 1px solid var(--primary-color) !important;
    box-shadow: 0 1px 0 0 var(--primary-color) !important;
}

/* Buttons */
.btn, .btn-large, .btn-small {
    border-radius: 4px;
    text-transform: none;
    font-weight: 500;
}

.btn, .btn-large {
    background-color: var(--dx-accent);
}

.btn-floating {
    box-shadow: 0 5px 11px 0 rgba(0,0,0,0.18), 0 4px 15px 0 rgba(0,0,0,0.15);
}

/* Navigation */
nav {
    box-shadow: 0 2px 5px rgba(0,0,0,0.16), 0 2px 10px rgba(0,0,0,0.12);
    overflow: visible; /* allow oversized brand logo to overlap */
}

/* Dropdown menus: ensure visible contrast (white bg, black text, gold hover) */
.dropdown-content {
    background-color: var(--dx-primary) !important; /* black background */
    border: 1px solid var(--dx-accent) !important; /* gold border */
    box-shadow: 0 6px 12px rgba(0,0,0,0.25) !important;
    z-index: 1000 !important; /* ensure above nav */
}
.dropdown-content li > a, .dropdown-content li > span {
    color: #FFFFFF !important; /* white text */
    font-weight: 500 !important;
}
.dropdown-content li:hover > a, .dropdown-content li.active > a {
    color: #FFFFFF !important; /* keep readable on hover */
}
.dropdown-content li:hover, .dropdown-content li.active {
    background-color: rgba(255, 215, 0, 0.12) !important; /* subtle gold hover */
}
.dropdown-content .divider {
    background-color: rgba(255, 215, 0, 0.25) !important; /* gold-tinted divider */
}

/* Ensure legibility when using dark brand colors */
.btn.black, .btn.black:hover, .btn.black:focus {
    color: #FFFFFF !important;
}
.chip.blue { /* chips using .blue are black by theme, force white text */
    color: #FFFFFF !important;
}

/* Theme overrides for Materialize color utilities to align with GN brand
    Replace blue utility classes with black/neutral tones to avoid blue accents */
.blue { background-color: var(--dx-primary) !important; } /* black */
.blue-text { color: var(--dx-primary) !important; }       /* black text */
.blue.lighten-1 { background-color: var(--dx-primary-hover) !important; } /* dark gray */
.blue.lighten-5 { background-color: #F5F5F5 !important; } /* light neutral */
.chip.blue.white-text,
.badge.blue.white-text,
.card.blue.white-text { color: #ffffff !important; } /* keep white text on dark backgrounds */
.material-icons.blue-text { color: var(--dx-primary) !important; }

nav .nav-wrapper a, nav .nav-wrapper ul li a {
    color: #ffffff !important;
}

.sidenav li a {
    color: var(--dx-text) !important;
}

.page-footer a {
    color: #fff4c2; /* light gold for footer links */
}

.footer-contact-list {
    margin: 0;
}

.footer-contact-list li {
    margin-bottom: 4px;
}

.footer-copyright-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    padding: 0.25rem 0;
}

.footer-copy-right {
    text-align: right;
}

@media only screen and (max-width: 600px) {
    .footer-copyright-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .footer-copy-right {
        text-align: left;
    }
}

/* Badges */
.badge {
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.8rem;
}

/* Collections */
.collection .collection-item {
    padding: 15px 20px;
    transition: background-color 0.2s;
}

.collection .collection-item:hover {
    background-color: #f5f5f5;
}

/* Status indicators */
.status-active {
    color: var(--success-color);
}

.status-inactive {
    color: var(--danger-color);
}

.status-pending {
    color: var(--warning-color);
}

/* Utility classes */
.mt-1 { margin-top: 10px !important; }
.mt-2 { margin-top: 20px !important; }
.mt-3 { margin-top: 30px !important; }

.mb-1 { margin-bottom: 10px !important; }
.mb-2 { margin-bottom: 20px !important; }
.mb-3 { margin-bottom: 30px !important; }

.p-1 { padding: 10px !important; }
.p-2 { padding: 20px !important; }
.p-3 { padding: 30px !important; }

/* Loading spinner */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

/* Alert/Flash messages */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.alert-success {
    background-color: #c8e6c9;
    color: #2e7d32;
}

.alert-error {
    background-color: #ffcdd2;
    color: #c62828;
}

.alert-warning {
    background-color: #ffe0b2;
    color: #e65100;
}

.alert-info {
    background-color: #b3e5fc;
    color: #01579b;
}

/* Responsive */
@media only screen and (max-width: 992px) {
    .card-title {
        font-size: 1.5rem;
    }
}

@media only screen and (max-width: 600px) {
    .btn, .btn-large {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Equal-height cards utility for paired layouts */
.equal-cards {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}
.equal-cards .col {
    display: flex;
}
.equal-cards .card {
    display: flex;
    flex-direction: column;
    width: 100%;
}
.equal-cards .card .card-content {
    flex: 1 1 auto;
}
.equal-cards .card .card-action {
    margin-top: auto;
}

/* Print styles */
@media print {
    nav, footer, .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
