/* 
 * Bicycle Management System - Extended Premium Styles
 * Features: Toasts, Search, Charts, Mobile Optimizations (Added)
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
    --primary: #00E5FF;
    --primary-dim: rgba(0, 229, 255, 0.1);
    --secondary: #7000FF;
    --accent: #2979FF;
    --success: #00E676;
    --warning: #FFC400;
    --danger: #FF3D00;
    
    --bg-body: #050510;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --bg-modal: rgba(10, 10, 25, 0.85);
    --border-light: rgba(255, 255, 255, 0.08);
    
    --text-main: #FFFFFF;
    --text-muted: #A0A0B0;
    
    --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --glass-border: 1px solid rgba(255, 255, 255, 0.05);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(112, 0, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 229, 255, 0.1) 0%, transparent 40%);
}

ul { list-style: none; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; }
input, select { font-family: inherit; outline: none; }

/* Layout */
.app-container { display: flex; height: 100vh; }

/* Sidebar */
.sidebar {
    width: 260px;
    background: rgba(10, 10, 20, 0.8);
    backdrop-filter: blur(20px);
    border-right: var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    transition: var(--transition);
}

.brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.brand span { color: var(--primary); }

.nav-menu { display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }

.nav-item {
    padding: 0.8rem 1rem;
    border-radius: 12px;
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
}
.nav-item:hover, .nav-item.active { background: var(--primary-dim); color: var(--primary); }
.nav-item i { font-size: 1.1rem; width: 24px; text-align: center; }

.user-profile {
    margin-top: auto;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border: var(--glass-border);
}

.avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
}

.user-info h4 { font-size: 0.9rem; font-weight: 600; }
.user-info p { font-size: 0.75rem; color: var(--text-muted); }

/* Main Content */
.main-content { flex: 1; overflow-y: auto; padding: 2rem; position: relative; }

.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2.5rem; }
.page-title h1 { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; }
.page-title p { color: var(--text-muted); margin-top: 0.25rem; }

.actions { display: flex; gap: 1rem; }

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex; align-items: center; gap: 0.5rem;
    transition: var(--transition);
}
.btn-primary {
    background: var(--primary);
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 229, 255, 0.4);
}
.btn-glass { background: var(--bg-card); border: var(--glass-border); color: var(--text-main); }
.btn-glass:hover { background: var(--bg-card-hover); }

/* Dashboard Grid */
.dashboard-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem; margin-bottom: 2.5rem;
}
.stat-card {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex; flex-direction: column; justify-content: space-between;
    height: 160px;
    transition: var(--transition);
}
.stat-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0.2); }
.stat-icon {
    width: 48px; height: 48px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin-bottom: 1rem;
}
.stat-card h3 { font-size: 2.5rem; font-family: var(--font-heading); font-weight: 700; }
.stat-card p { color: var(--text-muted); font-size: 0.9rem; }

/* Tables */
.table-container {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    overflow-x: auto;
}
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.section-header h2 { margin-right: auto; }

/* Search Bar Styles */
.search-wrapper {
    position: relative;
    width: 250px;
}
.search-wrapper i {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 0.9rem;
}
.search-input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.2rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: white;
    font-size: 0.9rem;
    transition: var(--transition);
}
.search-input:focus {
    border-color: var(--primary);
    background: rgba(255,255,255,0.08);
}

table { width: 100%; border-collapse: collapse; min-width: 600px; }
th { text-align: left; color: var(--text-muted); font-weight: 500; padding: 1rem; border-bottom: var(--glass-border); }
td { padding: 1rem; border-bottom: var(--glass-border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255, 255, 255, 0.02); }

.status-badge { padding: 0.4rem 0.8rem; border-radius: 30px; font-size: 0.8rem; font-weight: 600; }
.status-available { background: rgba(0, 230, 118, 0.15); color: var(--success); }
.status-rented { background: rgba(41, 121, 255, 0.15); color: var(--accent); }
.status-maintenance { background: rgba(255, 196, 0, 0.15); color: var(--warning); }

/* --- Modals --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex; justify-content: center; align-items: center;
    z-index: 1000;
    opacity: 0; pointer-events: none;
    transition: var(--transition);
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal {
    background: #0b0b15;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border-radius: 20px;
    width: 400px; max-width: 90%;
    padding: 2rem;
    transform: translateY(20px);
    transition: var(--transition);
}
.modal-overlay.active .modal { transform: translateY(0); }

.modal-header { display: flex; justify-content: space-between; margin-bottom: 1.5rem; }
.modal-header h2 { font-family: var(--font-heading); }
.close-modal { background: none; color: var(--text-muted); font-size: 1.5rem; }

.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.5rem; }
.form-input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 0.8rem; border-radius: 10px;
    color: white; font-size: 1rem;
    transition: var(--transition);
}
.form-input:focus { border-color: var(--primary); background: rgba(255,255,255,0.08); }

/* Toast Notifications */
#toast-container {
    position: fixed; bottom: 20px; right: 20px; z-index: 3000;
    display: flex; flex-direction: column; gap: 10px;
}
.toast {
    background: var(--bg-card);
    border-left: 4px solid var(--primary);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    color: white;
    min-width: 280px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex; align-items: center; gap: 10px;
}
.toast.active { transform: translateX(0); }
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
.toast-icon { font-size: 1.2rem; }

/* Chart Container */
.chart-container {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    min-height: 300px;
    position: relative;
    width: 100%;
}

/* Login Screen */
#view-login {
    position: fixed; inset: 0; z-index: 2000;
    background: #050510;
    background-image: radial-gradient(circle at 50% 50%, rgba(112, 0, 255, 0.2) 0%, transparent 60%);
    display: flex; justify-content: center; align-items: center;
}
.login-card {
    width: 400px; padding: 3rem; background: rgba(255,255,255,0.02); border: var(--glass-border);
    backdrop-filter: blur(20px); border-radius: 24px; text-align: center;
}

/* Utilities */
.hidden { display: none !important; }
.fade-in { animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed; top: 1rem; left: 1rem; z-index: 200;
    background: var(--bg-card); border: var(--glass-border);
    width: 45px; height: 45px; border-radius: 12px;
    align-items: center; justify-content: center;
    backdrop-filter: blur(10px);
    cursor: pointer; transition: var(--transition);
}
.mobile-menu-toggle:hover { background: var(--bg-card-hover); }

/* Customer Cards */
.customer-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem; margin-bottom: 2rem;
}
.customer-card {
    background: var(--bg-card); border: var(--glass-border);
    border-radius: 16px; padding: 1.5rem;
    transition: var(--transition);
}
.customer-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.15); }
.customer-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.customer-avatar {
    width: 50px; height: 50px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.2rem;
}
.customer-info h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.customer-info p { font-size: 0.8rem; color: var(--text-muted); }
.customer-stats { display: flex; justify-content: space-between; margin-top: 1rem; padding-top: 1rem; border-top: var(--glass-border); }
.customer-stat { text-align: center; }
.customer-stat .value { font-size: 1.2rem; font-weight: 700; color: var(--primary); }
.customer-stat .label { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }

/* Timeline */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 2px; background: var(--border-light);
}
.timeline-item {
    position: relative; padding-bottom: 1.5rem;
}
.timeline-item::before {
    content: ''; position: absolute; left: -2.5rem; top: 5px;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--primary); border: 2px solid var(--bg-body);
}
.timeline-content {
    background: var(--bg-card); border: var(--glass-border);
    border-radius: 12px; padding: 1rem;
}
.timeline-header { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
.timeline-title { font-weight: 600; }
.timeline-time { font-size: 0.8rem; color: var(--text-muted); }

/* Badges */
.badge {
    display: inline-block; padding: 0.25rem 0.6rem;
    border-radius: 20px; font-size: 0.75rem; font-weight: 600;
    margin-left: 0.5rem;
}
.badge-new { background: rgba(0, 229, 255, 0.15); color: var(--primary); }
.badge-pro { background: rgba(255, 196, 0, 0.15); color: var(--warning); }

/* Tabs */
.tabs {
    display: flex; gap: 1rem; margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}
.tab-btn {
    padding: 0.75rem 1.5rem; background: none;
    color: var(--text-muted); font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: var(--transition); cursor: pointer;
}
.tab-btn.active {
    color: var(--primary); border-bottom-color: var(--primary);
}
.tab-btn:hover { color: var(--text-main); }

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle { display: flex; }
    .sidebar { position: fixed; transform: translateX(-100%); z-index: 100; height: 100%; }
    .sidebar.open { transform: translateX(0); }
    .main-content { padding: 1rem; padding-top: 4rem; width: 100%; }
    .page-title h1 { font-size: 1.5rem; }
    .actions .btn span { display: none; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .search-wrapper { width: 100%; }
}
