
/* Enhanced Styles for RentalApp - Modern & Visually Appealing */

/* ===== ROOT VARIABLES ===== */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --info-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --warning-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --card-shadow: 0 10px 30px rgba(0,0,0,0.1);
    --card-shadow-hover: 0 20px 40px rgba(0,0,0,0.15);
    --border-radius: 15px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== BODY & GENERAL ===== */
body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    color: #2c3e50;
    line-height: 1.6;
}

/* Navbar brand image styling */
.navbar-brand img {
    display: inline-block !important;
    vertical-align: middle !important;
    margin-right: 8px !important;
    max-height: 40px !important;
    filter: contrast(1.2) brightness(0.8) sepia(0.6) saturate(3) hue-rotate(240deg) !important;
}

.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.2);
    transition: var(--transition);
}

/* Enhanced navbar navigation links */
.navbar-nav .nav-link {
    position: relative;
    padding: 8px 16px !important;
    margin: 0 4px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #000 !important;
}

.navbar-nav .nav-link:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #000 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.navbar-nav .nav-link i {
    transition: transform 0.3s ease;
    color: #000 !important;
}

.navbar-nav .nav-link:hover i {
    transform: scale(1.1);
}

/* Special styling for logout button */
.navbar-nav .nav-link[href*="logout"] {
    background: #dc3545;
    color: #000 !important;
    margin-left: 8px;
}

.navbar-nav .nav-link[href*="logout"]:hover {
    background: #c82333;
    color: #000 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Navbar brand styling - override gradient text */
.navbar-brand {
    color: #000 !important;
}

.navbar-brand:hover {
    color: #000 !important;
}

/* Navbar toggler button styling */
.navbar-toggler {
    border: 2px solid rgba(0, 0, 0, 0.3) !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    transition: all 0.3s ease !important;
    background: rgba(255, 255, 255, 0.9) !important;
}

.navbar-toggler:hover {
    border-color: #000 !important;
    background: rgba(0, 0, 0, 0.1) !important;
    transform: scale(1.05);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.25) !important;
    border-color: #000 !important;
}

.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%280, 0, 0, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar:hover {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

/* ===== CARDS & COMPONENTS ===== */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

/* ===== STATISTICS CARDS ===== */
.border-left-primary {
    border-left: none !important;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.border-left-success {
    border-left: none !important;
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.1) 0%, rgba(56, 239, 125, 0.1) 100%);
}

.border-left-info {
    border-left: none !important;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.border-left-warning {
    border-left: none !important;
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.1) 0%, rgba(245, 87, 108, 0.1) 100%);
}

.border-left-primary::before { background: var(--primary-gradient); }
.border-left-success::before { background: var(--success-gradient); }
.border-left-info::before { background: var(--info-gradient); }
.border-left-warning::before { background: var(--warning-gradient); }

/* ===== BUTTONS ===== */
.btn {
    border-radius: 25px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--primary-gradient);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    background: var(--primary-gradient);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn-success {
    background: var(--success-gradient);
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.4);
}

.btn-success:hover {
    background: var(--success-gradient);
    box-shadow: 0 8px 25px rgba(17, 153, 142, 0.6);
}

.btn-info {
    background: var(--info-gradient);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-info:hover {
    background: var(--info-gradient);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn-warning {
    background: var(--warning-gradient);
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.4);
}

.btn-warning:hover {
    background: var(--warning-gradient);
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.6);
}

.btn-outline-primary {
    border: 2px solid;
    background: transparent;
    color: #667eea;
}

.btn-outline-primary:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

/* ===== TABLES ===== */
.table {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.table thead th {
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 1px;
    border: none;
    padding: 1rem;
    position: relative;
}

.table tbody tr {
    transition: var(--transition);
    border: none;
}

.table tbody tr:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.table tbody td {
    padding: 1rem;
    border: none;
    vertical-align: middle;
}

/* ===== SORTABLE HEADERS ===== */
.sortable-header {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.sortable-header:hover {
    opacity: 0.8;
}

.sort-indicator {
    margin-left: 0.5rem;
    opacity: 0.6;
    transition: var(--transition);
}

.sort-indicator.active {
    opacity: 1;
    color: #ffd700;
}

/* ===== FORMS ===== */
.form-control {
    border-radius: 10px;
    border: 2px solid rgba(0,0,0,0.1);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    background: rgba(255, 255, 255, 0.95);
}

.form-control:hover {
    border-color: rgba(102, 126, 234, 0.5);
}

/* ===== BADGES & STATUS ===== */
.badge {
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: var(--success-gradient);
    color: white;
}

.badge-primary {
    background: var(--primary-gradient);
    color: white;
}

.badge-warning {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #8b4513;
}

.badge-secondary {
    background: linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%);
    color: white;
}

/* ===== PROGRESS BARS ===== */
.progress {
    height: 8px;
    border-radius: 10px;
    background: rgba(0,0,0,0.1);
    overflow: hidden;
}

.progress-bar {
    background: var(--primary-gradient);
    border-radius: 10px;
    transition: width 1s ease-in-out;
}

/* ===== ALERTS ===== */
.alert {
    border-radius: 15px;
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-gradient);
}

.alert-info::before { background: var(--info-gradient); }
.alert-success::before { background: var(--success-gradient); }
.alert-warning::before { background: var(--warning-gradient); }
.alert-danger::before { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); }

/* ===== AUTOCOMPLETE ===== */
.autocomplete-results {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    width: 100%;
    display: none;
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
    position: relative;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transform: translateX(5px);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.fade-in-up:nth-child(1) { animation-delay: 0.1s; }
.fade-in-up:nth-child(2) { animation-delay: 0.2s; }
.fade-in-up:nth-child(3) { animation-delay: 0.3s; }
.fade-in-up:nth-child(4) { animation-delay: 0.4s; }

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }

    .table-responsive {
        border-radius: 10px;
        overflow: hidden;
    }

    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .autocomplete-results {
        max-height: 200px;
    }
}

/* ===== UTILITY CLASSES ===== */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-lg-custom {
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

/* ===== LOADING STATES ===== */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}
