/* 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-color: #f9fafb; /* Default light background */
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Blue gradient background only for login/auth pages */
body.login-page {
    background: linear-gradient(135deg, #1e3a8a 0%, #1f2937 50%, #111827 100%);
}

/* Animated Bubble Background - only for login pages */
body.login-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(147, 197, 253, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(96, 165, 250, 0.08) 0%, transparent 50%);
    z-index: -2;
    animation: bubbleFloat 20s ease-in-out infinite;
}

body.login-page::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 60% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 10%, rgba(59, 130, 246, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 10% 90%, rgba(147, 197, 253, 0.08) 0%, transparent 35%);
    z-index: -1;
    animation: bubbleFloat 25s ease-in-out infinite reverse;
}

@keyframes bubbleFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 1;
    }
    33% {
        transform: translateY(-30px) rotate(120deg);
        opacity: 0.8;
    }
    66% {
        transform: translateY(-60px) rotate(240deg);
        opacity: 0.6;
    }
}

/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    padding: 50px;
    width: 100%;
    max-width: 450px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(147, 197, 253, 0.03) 0%, transparent 50%);
    animation: cardBubble 15s ease-in-out infinite;
    z-index: -1;
}

@keyframes cardBubble {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #1e3a8a;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(30, 58, 138, 0.1);
    letter-spacing: -0.02em;
}

.login-logo {
    max-width: 200px;
    height: auto;
    margin: 0 auto 20px;
    display: block;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.login-logo:hover {
    transform: scale(1.05);
}

.login-header p {
    color: #4b5563;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Enhanced Login Form Styles */
.login-form {
    position: relative;
    z-index: 1;
}

.form-group {
    margin-bottom: 28px;
    position: relative;
}

.form-group label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    color: #1f2937;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.form-group label i {
    margin-right: 8px;
    color: #3b82f6;
    font-size: 1.1rem;
}

.form-control {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: #1f2937;
    position: relative;
}



.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(255, 255, 255, 1);
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.1),
        0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.form-control.is-invalid {
    border-color: #ef4444;
    background: rgba(254, 242, 242, 0.9);
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #60a5fa 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary::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-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #1f2937;
    border: 2px solid rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    transform: translateY(-2px);
}

/* Download Section Styles */
.download-section {
    margin-top: 32px;
    padding-top: 32px;
    position: relative;
}

.download-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 24px;
    position: relative;
}

.download-divider::before,
.download-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
}

.download-divider span {
    padding: 0 16px;
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.98);
}

.download-text {
    text-align: center;
    color: #4b5563;
    font-size: 0.95rem;
    margin-bottom: 20px;
    font-weight: 500;
}

.download-buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.download-btn {
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.download-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.download-btn:active {
    transform: translateY(0);
}

.download-btn-apple {
    background: none;
    border: none;
}

.download-btn-apple:hover {
    background: none;
    box-shadow: none;
}

.store-icon {
    height: 35px;
    width: auto;
    display: block;
}

/* Mobile Responsive for Download Section */
@media (max-width: 480px) {
    .download-section {
        margin-top: 24px;
        padding-top: 24px;
    }
    
    .download-text {
        font-size: 0.9rem;
        margin-bottom: 16px;
    }
    
    .download-buttons {
        gap: 10px;
        flex-direction: column;
    }
    
    .store-icon {
        height: 40px;
    }
}

/* Alert Styles */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 0.95rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid;
}

.alert-danger {
    background: rgba(254, 242, 242, 0.95);
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.3);
}

.alert-success {
    background: rgba(240, 253, 244, 0.95);
    color: #059669;
    border-color: rgba(34, 197, 94, 0.3);
}

.alert-info {
    background: rgba(239, 246, 255, 0.95);
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, 0.3);
    text-align: left;
}

.alert-info strong {
    color: #1e40af;
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.alert-info strong i {
    margin-right: 8px;
}

/* Dashboard Styles */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    background: #f7fafc;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #2d3748 0%, #1a202c 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid #4a5568;
    text-align: center;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #cbd5e0;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(102, 126, 234, 0.1);
    color: white;
    border-left-color: #667eea;
}

.nav-link i {
    margin-right: 12px;
    font-size: 1.1rem;
    width: 20px;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    margin-left: 280px;
    background: #f7fafc;
}

/* Header Styles */
.header {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-title h1 {
    color: #2d3748;
    font-size: 1.8rem;
    font-weight: 700;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-menu {
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

/* Content Area */
.content {
    padding: 30px;
}

.content-header {
    margin-bottom: 30px;
}

.content-header h2 {
    color: #2d3748;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.content-header p {
    color: #718096;
    font-size: 1.1rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
}

.card-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.card-header h3 {
    color: #2d3748;
    font-size: 1.3rem;
    font-weight: 600;
}

/* Users Grid */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.user-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.user-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.user-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: white;
    font-size: 1.5rem;
}

.user-info {
    flex-grow: 1;
    margin-bottom: 15px;
}

.user-info h4 {
    color: #2d3748;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.user-info p {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.user-email {
    font-weight: 500;
    color: #4a5568 !important;
}

.user-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.inline-form {
    display: inline;
}

.no-users {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.no-users i {
    font-size: 4rem;
    color: #cbd5e0;
    margin-bottom: 20px;
}

.no-users h4 {
    color: #4a5568;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.no-users p {
    margin-bottom: 20px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #667eea;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h4 {
    color: #718096;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.stat-card .stat-value {
    color: #2d3748;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-card .stat-change {
    font-size: 0.9rem;
    color: #48bb78;
}

/* Dashboard Grid Styles */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.activity-card .activity-list {
    padding: 0;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: white;
}

.activity-icon.user-icon {
    background: #667eea;
}

.activity-icon.success-icon {
    background: #48bb78;
}

.activity-icon.warning-icon {
    background: #ed8936;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
}

.activity-desc {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 4px;
}

.activity-time {
    font-size: 0.8rem;
    color: #a0aec0;
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f7fafc;
    border-radius: 10px;
    text-decoration: none;
    color: #4a5568;
    transition: all 0.3s ease;
}

.quick-action-btn:hover {
    background: #edf2f7;
    transform: translateY(-2px);
    text-decoration: none;
    color: #4a5568;
}

.quick-action-btn i {
    margin-right: 15px;
    color: #667eea;
    font-size: 1.2rem;
}

.quick-action-btn strong {
    display: block;
    margin-bottom: 2px;
}

.quick-action-btn small {
    color: #718096;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.status-item {
    text-align: center;
    padding: 20px;
}

.status-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.status-icon.success {
    color: #48bb78;
}

.status-icon.warning {
    color: #ed8936;
}

.status-label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
}

.status-value.success {
    color: #48bb78;
    font-size: 0.9rem;
}

.status-value.warning {
    color: #ed8936;
    font-size: 0.9rem;
}

/* Profile Page Styles */
.profile-container {
    display: grid;
    gap: 30px;
}

.profile-form .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.profile-form .form-group {
    flex: 1;
}

.account-info {
    display: grid;
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.info-item label {
    font-weight: 600;
    color: #2d3748;
}

.info-item span {
    color: #718096;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-badge.active {
    background: #c6f6d5;
    color: #22543d;
}

.password-form .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

/* Settings Page Styles */
.settings-container {
    display: grid;
    gap: 30px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.setting-info {
    flex: 1;
}

.setting-info label {
    font-weight: 600;
    color: #2d3748;
    display: block;
    margin-bottom: 5px;
}

.setting-info p {
    color: #718096;
    font-size: 0.9rem;
    margin: 0;
}

.setting-control {
    margin-left: 20px;
}

/* Toggle Switch Styles */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #667eea;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Danger Zone Styles */
.danger-zone {
    border: 2px solid #fed7d7;
    background: #fef5e7;
}

.danger-zone .card-header {
    background: #fed7d7;
    color: #c53030;
}

.danger-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #fed7d7;
}

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

.danger-info {
    flex: 1;
}

.danger-info label {
    font-weight: 600;
    color: #c53030;
    display: block;
    margin-bottom: 5px;
}

.danger-info p {
    color: #744210;
    font-size: 0.9rem;
    margin: 0;
}

.danger-control {
    margin-left: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .dashboard-header {
        padding: 15px 20px;
    }
    
    .menu-btn {
        display: block;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row .form-group {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .profile-form .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .password-form .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .setting-control {
        margin-left: 0;
    }
    
    .danger-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .danger-control {
        margin-left: 0;
    }
    
    .header {
        padding: 15px 20px;
    }
    
    .content {
        padding: 20px;
    }
    
    .login-card {
        padding: 30px 20px;
    }
    
    .login-logo {
        max-width: 150px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-center p {
    color: #6b7280;
    margin-bottom: 16px;
    font-weight: 500;
}

.mt-3 {
    margin-top: 1rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.d-none {
    display: none;
}

.d-block {
    display: block;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Form Validation */
.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 5px;
    font-size: 0.875rem;
    color: #e53e3e;
}

.was-validated .form-control:invalid {
    border-color: #e53e3e;
    background: #fed7d7;
}
.was-validated .form-control:valid {
    border-color: #48bb78;
    background: #c6f6d5;
}
