/* Easy-Wakala Custom Styles - Modern Dashboard Design */

:root {
    /* Color Palette from Design */
    --color-primary-dark: #0D1F23;
    --color-primary: #132E35;
    --color-secondary: #2D4A53;
    --color-accent: #69818D;
    --color-light: #AFB3B7;
    --color-grey: #5A636A;
    
    /* Additional Colors */
    --color-success: #10b981;
    --color-danger: #ef4444;
    --color-warning: #f59e0b;
    --color-info: #3b82f6;
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-sidebar: var(--color-primary-dark);
    --bg-card: #ffffff;
    
    /* Text Colors */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #ffffff;
    
    /* Spacing */
    --sidebar-width: 260px;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-secondary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    color: var(--text-light);
    padding: 1.5rem 0;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-logo {
    padding: 0 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.sidebar-logo i {
    font-size: 2rem;
    color: var(--color-success);
}

.sidebar-logo h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-light);
}

.sidebar-menu {
    list-style: none;
    padding: 0;
}

.sidebar-menu li {
    margin: 0.25rem 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border-left-color: var(--color-success);
}

.sidebar-menu a.active {
    background: rgba(16, 185, 129, 0.2);
    color: var(--text-light);
    border-left-color: var(--color-success);
}

.sidebar-menu a i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.sidebar-menu .badge {
    margin-left: auto;
    background: var(--color-danger);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
}

.sidebar-pro-card {
    margin: 1.5rem;
    padding: 1.5rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    text-align: center;
}

.sidebar-pro-card i {
    font-size: 2rem;
    color: var(--color-success);
    margin-bottom: 0.5rem;
}

.sidebar-pro-card p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
}

.sidebar-pro-card .btn {
    width: 100%;
    background: var(--color-success);
    border: none;
    color: white;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding-top: var(--header-height);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background: var(--bg-primary);
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 999;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-search {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.header-search input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--bg-secondary);
}

.header-search input:focus {
    background: white;
    border-color: var(--color-primary);
}

.header-search i {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-actions .icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.header-actions .icon-btn:hover {
    background: #e5e7eb;
    color: var(--text-primary);
}

.header-actions .notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--color-danger);
    border-radius: 50%;
    border: 2px solid white;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.header-user:hover {
    background: var(--bg-secondary);
}

.header-user .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
}

.header-user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* Content Container */
.content-container {
    padding: 2rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: none;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h5 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.card-body {
    padding: 1.5rem;
}

/* Balance Card */
.balance-card {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: var(--text-light);
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
}

.balance-card h6 {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.balance-card h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.balance-card .balance-details {
    display: flex;
    gap: 2rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

.balance-card .balance-icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 3rem;
    opacity: 0.2;
}

/* Stat Cards */
.stat-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--bg-secondary);
}

.stat-card-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
}

.stat-card-icon.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
}

.stat-card-icon.info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--color-info);
}

.stat-card-content {
    flex: 1;
}

.stat-card-content .percentage {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.stat-card-content .percentage.positive {
    color: var(--color-success);
}

.stat-card-content .percentage.negative {
    color: var(--color-danger);
}

.stat-card-content .amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-card-content .label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.quick-action-btn {
    flex: 1;
    min-width: 120px;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-primary);
}

.quick-action-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--color-success);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quick-action-btn i {
    font-size: 2rem;
    color: var(--color-success);
    margin-bottom: 0.5rem;
    display: block;
}

.quick-action-btn span {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Progress Bar */
.progress-section {
    margin-bottom: 1.5rem;
}

.progress-section h6 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.progress-section .progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.progress-bar-container {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-success) 0%, #34d399 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead th {
    background: var(--bg-secondary);
    padding: 1rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e5e7eb;
}

.table tbody td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.875rem;
}

.table tbody tr:hover {
    background: var(--bg-secondary);
}

/* Status Badges */
.badge {
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--color-info);
}

/* Activity Feed */
.activity-feed {
    list-style: none;
    padding: 0;
}

.activity-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
}

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

.activity-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.activity-content {
    flex: 1;
}

.activity-content .activity-text {
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.activity-content .activity-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.activity-date {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--text-light);
}

.btn-primary:hover {
    background: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 31, 35, 0.3);
}

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

.btn-success:hover {
    background: #059669;
}

.btn-outline {
    background: transparent;
    border: 1px solid #e5e7eb;
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--bg-secondary);
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: none;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
    border-left: 4px solid var(--color-success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
    border-left: 4px solid var(--color-danger);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
    border-left: 4px solid var(--color-warning);
}

/* Lock Screen */
.lock-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 31, 35, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lock-screen-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    max-width: 400px;
    width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Chart Container */
#cashflowChart, #statisticsChart {
    max-height: 300px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header {
        left: 0;
    }
    
    .content-container {
        padding: 1rem;
    }
    
    .balance-card h2 {
        font-size: 1.75rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
}

/* Form Styles */
.form-control, .form-select {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(13, 31, 35, 0.1);
    outline: none;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.col {
    flex: 1;
    padding: 0 0.75rem;
}

.col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
    padding: 0 0.75rem;
}

.col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0 0.75rem;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 0.75rem;
}

.col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
    padding: 0 0.75rem;
}

.col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 0.75rem;
}

@media (max-width: 768px) {
    .col-md-3, .col-md-4, .col-md-6, .col-md-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Dark Mode Styles */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-card: #252525;
    --text-primary: #e5e5e5;
    --text-secondary: #a0a0a0;
    --bg-sidebar: var(--color-primary-dark);
}

[data-theme="dark"] body {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .header {
    background: var(--bg-primary);
    border-bottom: 1px solid #3a3a3a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .header-search input {
    background: var(--bg-secondary);
    border-color: #3a3a3a;
    color: var(--text-primary);
}

[data-theme="dark"] .header-search input:focus {
    background: var(--bg-card);
    border-color: var(--color-primary);
}

[data-theme="dark"] .header-actions .icon-btn {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

[data-theme="dark"] .header-actions .icon-btn:hover {
    background: #3a3a3a;
    color: var(--text-primary);
}

[data-theme="dark"] .card {
    background: var(--bg-card);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .card-header {
    border-bottom: 1px solid #3a3a3a;
}

[data-theme="dark"] .table thead th {
    background: var(--bg-secondary);
    border-bottom: 2px solid #3a3a3a;
    color: var(--text-secondary);
}

[data-theme="dark"] .table tbody td {
    border-bottom: 1px solid #3a3a3a;
}

[data-theme="dark"] .table tbody tr:hover {
    background: var(--bg-secondary);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background: var(--bg-secondary);
    border-color: #3a3a3a;
    color: var(--text-primary);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background: var(--bg-card);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(13, 31, 35, 0.3);
}

[data-theme="dark"] .dropdown-menu {
    background: var(--bg-card);
    border: 1px solid #3a3a3a;
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-primary);
}

[data-theme="dark"] .dropdown-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .dropdown-divider {
    border-top: 1px solid #3a3a3a;
}

/* Notification Styles */
.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--color-danger);
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
    border: 2px solid var(--bg-primary);
}

.notification-dropdown {
    max-height: 500px;
    overflow-y: auto;
}

.notification-item {
    transition: background 0.2s ease;
}

.notification-item:hover {
    background: var(--bg-secondary) !important;
}

[data-theme="dark"] .notification-item {
    border-bottom: 1px solid #3a3a3a;
}

[data-theme="dark"] .notification-item:hover {
    background: var(--bg-secondary) !important;
}

[data-theme="dark"] .content-container {
    background: var(--bg-secondary);
}

[data-theme="dark"] .alert {
    background: var(--bg-card);
    border-left-color: var(--color-primary);
}

[data-theme="dark"] .btn-outline {
    border-color: #3a3a3a;
    color: var(--text-primary);
}

[data-theme="dark"] .btn-outline:hover {
    background: var(--bg-card);
    border-color: var(--color-primary);
}

[data-theme="dark"] .stat-card {
    background: var(--bg-card);
}

[data-theme="dark"] .stat-card-icon {
    background: var(--bg-secondary);
}

[data-theme="dark"] .quick-action-btn {
    background: var(--bg-card);
    border-color: #3a3a3a;
}

[data-theme="dark"] .quick-action-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--color-success);
}

[data-theme="dark"] .sidebar {
    background: linear-gradient(180deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
}

[data-theme="dark"] .toast {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
}
