/* -------------------------------------------------------------------
   1. VARIABLES & RESET
------------------------------------------------------------------- */
:root {
    /* Color Palette */
    --bg-body: #F6F1F1;
    --bg-card: #FFFFFF;
    --primary-color: #19A7CE;
    --primary-hover: #1486a6;
    --secondary-color: #000000;
    --text-main: #212529;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    
    /* Status Colors */
    --danger: #dc3545;
    --success: #28a745;
    --warning: #ffc107;

    /* Spacing & Radius */
    --radius-md: 10px;
    --radius-lg: 15px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

/* -------------------------------------------------------------------
   2. LAYOUT & UTILITIES
------------------------------------------------------------------- */
main.main-content {
    flex: 1; /* Pushes footer down */
    width: 100%;
    padding: 2rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: auto;
}

/* -------------------------------------------------------------------
   3. COMPONENTS
------------------------------------------------------------------- */

/* Cards */
.card-custom {
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    /* height: 100%; For grid alignment */
    transition: transform 0.2s ease;
}

.card-custom:hover {
    transform: translateY(-2px);
}

/* Buttons */
.btn-primary-custom {
    background-color: var(--primary-color);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.btn-primary-custom:hover {
    background-color: var(--primary-hover);
    color: white;
}

.btn-outline-custom {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
}

.btn-outline-custom:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Forms */
.form-control-custom {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    width: 100%;
    background-color: #f8f9fa;
}

.form-control-custom:focus {
    border-color: var(--primary-color);
    outline: none;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(25, 167, 206, 0.2);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
    color: var(--text-main);
}

/* -------------------------------------------------------------------
   4. NAVBAR OVERRIDES (Bootstrap Customization)
------------------------------------------------------------------- */
.navbar-custom {
    background-color: var(--primary-color);
    padding: 0.8rem 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: bold;
    color: white !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand img {
    height: 40px;
    width: auto;
    background: white;
    border-radius: 50%;
    padding: 2px;
}

.nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
}

.nav-link:hover {
    color: #FFFECB !important;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
}

/* Mobile Toggler White Icon */
.navbar-toggler {
    border-color: rgba(255,255,255,0.5);
}
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* -------------------------------------------------------------------
   5. TABLES (Modernized)
------------------------------------------------------------------- */
.table-wrapper {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden; /* Clips corners */
    box-shadow: var(--shadow-sm);
}

.table th {
    background-color: #f1f3f5;
    color: var(--text-main);
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

/* -------------------------------------------------------------------
   6. ALERTS & FLASH MESSAGES
------------------------------------------------------------------- */
.alert {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

/* -------------------------------------------------------------------
   7. RESPONSIVE UTILITIES
------------------------------------------------------------------- */
@media (max-width: 768px) {
    .login-grid {
        grid-template-columns: 1fr; /* Stack on mobile */
    }
    
    .navbar-collapse {
        background: rgba(0,0,0,0.1); /* Slight dim for menu bg on mobile */
        border-radius: var(--radius-md);
        padding: 10px;
        margin-top: 10px;
    }
}