/* styles.css - Complete Clean Version (No Duplicates) */

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #f6f8fb, #eef3ff);
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    color: #1f2937;
}

/* ===== LAYOUT ===== */
.app-content {
    flex: 1;
    padding: 60px 0 40px;
}

.app-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 2rem 0;
    margin-top: auto;
}

/* ===== NAVIGATION ===== */
.saas-navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-nav .nav-link {
    color: #333 !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #007bff !important;
}

/* Navbar hover (original preserved) */
.nav-item a:hover {
    color: #ffffff !important;
}

/* Submenu visibility */
.navbar-light .navbar-nav .nav-link,
.navbar-light .navbar-nav .dropdown-item {
    color: #000 !important;
}

.dropdown-item:hover {
    background-color: #d9d9d9;
    color: #d9d9d9;
}

/* ===== FORMS ===== */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 0 25px rgba(0,0,0,0.1);
}

.form-label {
    font-weight: 500;
    margin-bottom: 8px;
}

.form-control {
    padding: 12px 14px;
    border: 1px solid #dbe3f0;
    border-radius: 10px;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13,110,253,0.15);
    outline: none;
}

textarea.form-control,
input.form-control {
    border-radius: 0.5rem;
}

/* Form control small size */
.form-control-sm, .form-select-sm {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
}

/* ===== CARDS ===== */
.card {
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

.card-header {
    font-weight: 600;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e5e5e5;
    font-size: 1.1rem;
}

/* Auth card (login, register, password reset) */
.auth-card {
    background: white;
    border-radius: 16px;
    padding: 42px 36px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.04);
}

.auth-container {
    max-width: 460px;
    margin: auto;
}

.auth-title {
    text-align: center;
    margin-bottom: 28px;
}

/* ===== BUTTONS ===== */
.btn-primary {
    background-color: #007bff;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: #0056d2;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(13,110,253,0.25);
    cursor: pointer;
}

.btn-success {
    background-color: #28a745;
    border: none;
    transition: all 0.2s ease;
}

.btn-success:hover {
    background-color: #1e7e34;
    cursor: pointer;
}

.btn-outline-primary {
    border: 1px solid #007bff;
    color: #007bff;
    background: transparent;
    padding: 10px 20px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-outline-primary:hover {
    background: #007bff;
    color: white;
    cursor: pointer;
}

.btn-outline-danger {
    transition: all 0.2s ease;
}

.btn-outline-danger:hover {
    background: #dc3545;
    color: white;
    cursor: pointer;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.2rem;
}

.d-grid .btn {
    width: 100%;
}

/* ===== STATS CARDS (Dashboard) ===== */
.stats-container {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-card {
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 20px;
    min-width: 150px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.stat-card h3 {
    margin: 0;
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    margin-top: 10px;
    color: #007bff;
}

/* ===== TABLES ===== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-hover tbody tr:hover {
    background-color: rgba(0,123,255,0.05);
    transition: background-color 0.2s ease;
}

/* ===== ALERTS ===== */
.alert {
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeeba;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* ===== UTILITIES ===== */
.text-success { color: #28a745 !important; }
.text-warning { color: #ffc107 !important; }
.text-danger { color: #dc3545 !important; }
.text-secondary { color: #6c757d !important; }

.gap-2 {
    gap: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}
.mt-3 {
    margin-top: 1rem;
}
.mt-4 {
    margin-top: 1.5rem;
}
.mt-5 {
    margin-top: 3rem;
}

/* Spacing overrides (original preserved) */
h1, label, .form-control, .btn {
    margin-bottom: 1rem;
}

/* ===== LOADING STATES ===== */
#loading {
    display: none;
    text-align: center;
    margin-top: 20px;
}

#ai_status {
    font-weight: 500;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .app-content {
        padding-top: 50px;
        padding-bottom: 20px;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .stats-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .stat-card {
        width: 100%;
    }
    
    .auth-card {
        padding: 30px 24px;
        margin: 0 16px;
    }
}