/* Smart Water Supply Management System - Main Stylesheet */

/* ====== CSS Reset and Base Styles ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

/* ====== Login Page Styles ====== */
.login-page {
    background: #1a1a1a;
    overflow: hidden;
}

.login-container {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.background-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.login-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-form-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 100%;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
    margin-top: 40px; /* Reduced to move form up */
    padding-top: 10px; /* Reduced to move form up */
}

.logo-section {
    margin-bottom: 30px;
}

.water-icon {
    font-size: 3.5rem;
    color: #2196F3;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
    display: block; /* Ensure icon is displayed */
}

.system-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1565C0;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(21, 101, 192, 0.2);
}

.system-subtitle {
    font-size: 1rem;
    color: #666;
    font-weight: 400;
    margin: 0;
}

.login-form-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-form-header h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 8px;
    font-weight: 600;
}

.login-form-header p {
    color: #666;
    font-size: 0.95rem;
}

/* ====== Flash Messages ====== */
.flash-messages {
    margin-bottom: 25px;
}

.alert {
    border-radius: 12px;
    border: none;
    padding: 15px 20px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.alert i {
    margin-right: 8px;
}

/* ====== Form Styles ====== */
.login-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-label i {
    margin-right: 6px;
    color: #2196F3;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
    transform: translateY(-1px);
}

.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #2196F3;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.form-check {
    display: flex;
    align-items: center;
}

.form-check-input {
    margin-right: 8px;
}

.form-check-label {
    color: #666;
    font-size: 0.9rem;
}

.login-btn {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.login-btn:hover {
    background: linear-gradient(135deg, #1976D2, #1565C0);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ====== Demo Credentials ====== */
.demo-credentials {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-top: 25px;
    border-left: 4px solid #2196F3;
}

.demo-credentials h6 {
    color: #333;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.demo-credentials h6 i {
    margin-right: 6px;
    color: #2196F3;
}

.demo-accounts {
    font-size: 0.9rem;
}

.demo-account {
    margin-bottom: 6px;
    color: #555;
}

.demo-account strong {
    color: #333;
}

/* ====== Footer ====== */
.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e1e5e9;
}

.footer-info p {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.footer-info i {
    margin-right: 5px;
    color: #2196F3;
}

.separator {
    margin: 0 10px;
    color: #ccc;
}

.copyright {
    color: #999;
    font-size: 0.8rem;
}

/* ====== Dashboard Styles ====== */
.dashboard-page {
    background: #f8f9fa;
}

.navbar {
    background: linear-gradient(135deg, #1565C0, #2196F3) !important;
    box-shadow: 0 2px 15px rgba(21, 101, 192, 0.2);
}

.navbar-brand {
    font-weight: 700;
    color: white !important;
    font-size: 1.3rem;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: white !important;
}

.main-content {
    padding: 30px 0;
}

.stats-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.stats-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.stats-number {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stats-label {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.text-primary-custom {
    color: #2196F3 !important;
}

.text-success-custom {
    color: #4CAF50 !important;
}

.text-warning-custom {
    color: #FF9800 !important;
}

.text-danger-custom {
    color: #F44336 !important;
}

/* ====== Responsive Design ====== */
@media (max-width: 768px) {
    .login-form-container {
        margin: 20px;
        padding: 30px 25px;
    }
    
    .system-title {
        font-size: 1.6rem;
    }
    
    .login-overlay {
        padding: 15px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .login-form-container {
        padding: 25px 20px;
    }
    
    .system-title {
        font-size: 1.4rem;
    }
    
    .water-icon {
        font-size: 3rem;
    }
}

/* ====== Animation Classes ====== */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====== Loading Spinner ====== */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* ====== Error Page Styles ====== */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.error-container {
    text-align: center;
    color: white;
    max-width: 500px;
    padding: 40px;
}

.error-code {
    font-size: 8rem;
    font-weight: 700;
    opacity: 0.8;
}

.error-message {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.error-description {
    font-size: 1rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.btn-home {
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-home:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-2px);
}