:root {
    --primary-color: #1a1a2e;
    --primary-dark: #0f0f1a;
    --secondary-color: #16213e;
    --accent-color: #4a5568;
    --accent-light: #718096;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --dark-color: #1f2937;
    --light-bg: #f8fafc;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --sidebar-width: 260px;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--light-bg);
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar-header {
    padding: 25px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header .logo {
    width: 70px;
    height: 70px;
    margin-bottom: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.sidebar-header i {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.sidebar-header h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.sidebar-header small {
    opacity: 0.8;
    font-size: 0.75rem;
}

.sidebar-menu {
    padding: 15px 0;
}

.menu-section {
    padding: 10px 20px 5px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.6;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: white;
}

.sidebar-menu a i {
    width: 24px;
    margin-right: 12px;
    font-size: 1.1rem;
}

.sidebar-menu .badge {
    margin-left: auto;
    font-size: 0.7rem;
}

/* Main content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* Top navbar */
.top-navbar {
    background: white;
    padding: 15px 25px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-color);
    cursor: pointer;
}

.page-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #2d3748, #1a202c);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.user-name {
    font-weight: 500;
    color: var(--dark-color);
}

/* Page content */
.page-content {
    padding: 25px;
}

/* Cards */
.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s;
    height: 100%;
}

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

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 15px;
}

.stat-card .stat-icon.income { background: linear-gradient(135deg, #10b981, #059669); }
.stat-card .stat-icon.expense { background: linear-gradient(135deg, #ef4444, #dc2626); }
.stat-card .stat-icon.pending { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-card .stat-icon.info { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.stat-card .stat-icon.purple { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); }

.stat-card h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
}

.stat-card p {
    color: #6b7280;
    margin: 5px 0 0;
    font-size: 0.9rem;
}

.stat-card .stat-change {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
}

.stat-card .stat-change.positive { color: var(--success-color); }
.stat-card .stat-change.negative { color: var(--danger-color); }

/* Content cards */
.content-card {
    background: white;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.content-card-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.content-card-header h5 {
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-card-body {
    padding: 25px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.data-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.data-table tr:hover {
    background: #f9fafb;
}

.data-table .amount {
    font-weight: 600;
    font-family: 'Consolas', monospace;
}

.data-table .amount.income { color: var(--success-color); }
.data-table .amount.expense { color: var(--danger-color); }

/* Badges */
.badge-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-status.pending { background: #fef3c7; color: #92400e; }
.badge-status.paid { background: #d1fae5; color: #065f46; }
.badge-status.overdue { background: #fee2e2; color: #991b1b; }
.badge-status.cancelled { background: #e5e7eb; color: #374151; }

.badge-priority {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-priority.urgent { background: #fee2e2; color: #991b1b; }
.badge-priority.high { background: #ffedd5; color: #9a3412; }
.badge-priority.normal { background: #dbeafe; color: #1e40af; }
.badge-priority.low { background: #e5e7eb; color: #374151; }

/* Buttons */
.btn-primary-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-icon {
    width: 35px;
    height: 35px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

/* Forms */
.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    padding: 12px 15px;
    transition: border-color 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.form-label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

/* Modals */
.modal-content {
    border: none;
    border-radius: 20px;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 20px 20px 0 0;
    padding: 20px 25px;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 15px 25px 25px;
    border: none;
}

/* Weekly schedule */
.weekly-schedule {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.day-column {
    background: #f9fafb;
    border-radius: 12px;
    padding: 15px;
    min-height: 200px;
}

.day-column.today {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 2px solid var(--primary-color);
}

.day-header {
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 10px;
}

.day-header .day-name {
    font-weight: 600;
    color: var(--dark-color);
}

.day-header .day-date {
    font-size: 0.8rem;
    color: #6b7280;
}

.payment-item {
    background: white;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s;
}

.payment-item:hover {
    transform: translateY(-2px);
}

.payment-item .payment-amount {
    font-weight: 600;
    font-size: 0.9rem;
}

.payment-item .payment-name {
    font-size: 0.8rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Empty state */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #6b7280;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h5 {
    color: var(--dark-color);
    margin-bottom: 10px;
}

/* Mobile styles */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    .weekly-schedule {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        margin-bottom: 15px;
    }
    
    .page-content {
        padding: 15px;
    }
    
    .top-navbar {
        padding: 15px;
    }
    
    .user-name {
        display: none;
    }
    
    .content-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 575.98px) {
    .page-title {
        font-size: 1.1rem;
    }
    
    .stat-card h3 {
        font-size: 1.4rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px;
        font-size: 0.85rem;
    }
    
    .modal-dialog {
        margin: 10px;
    }
}

/* Utility classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

/* Bildirim Sistemi */
.notification-wrapper {
    position: relative;
}

.notification-bell {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--dark-color);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 10px;
    transition: all 0.2s;
    position: relative;
}

.notification-bell:hover {
    background: rgba(0,0,0,0.05);
    color: var(--info-color);
}

.notification-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    min-width: 18px;
    height: 18px;
    background: var(--warning-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.notification-badge.urgent {
    background: var(--danger-color);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 380px;
    max-height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.notification-dropdown.show {
    display: block;
}

.notification-header {
    padding: 15px;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-header h6 {
    margin: 0;
    font-size: 0.95rem;
}

.notification-header .btn-link {
    color: white;
    opacity: 0.8;
}

.notification-summary {
    padding: 10px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.summary-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.summary-stats .stat {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.summary-stats .stat.critical { background: var(--danger-color); color: white; }
.summary-stats .stat.high { background: var(--warning-color); color: #333; }
.summary-stats .stat.medium { background: var(--info-color); color: white; }
.summary-stats .stat.low { background: var(--success-color); color: white; }

.summary-amount {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 5px;
}

.notification-list {
    max-height: 350px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
    gap: 12px;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.priority-critical {
    border-left: 3px solid var(--danger-color);
    background: #fff5f5;
}

.notification-item.priority-high {
    border-left: 3px solid var(--warning-color);
    background: #fffbeb;
}

.notification-item.priority-medium {
    border-left: 3px solid var(--info-color);
}

.notification-item.priority-low {
    border-left: 3px solid var(--success-color);
}

.notification-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-desc {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 4px;
}

.notification-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.notification-meta .amount {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--dark-color);
}

.notification-meta .overdue {
    font-size: 0.7rem;
    color: var(--danger-color);
    font-weight: 500;
}

.notification-meta .upcoming {
    font-size: 0.7rem;
    color: var(--info-color);
    font-weight: 500;
}

.notification-meta .company {
    font-size: 0.7rem;
    color: #999;
}

.notification-footer {
    padding: 12px;
    text-align: center;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.notification-footer a {
    color: var(--info-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.empty-notifications {
    padding: 30px;
    text-align: center;
    color: #999;
}

.empty-notifications i {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.more-notifications {
    padding: 10px;
    text-align: center;
    color: #666;
    font-size: 0.85rem;
    background: #f8f9fa;
}

/* Notification Modal */
.notification-group {
    margin-bottom: 0;
}

.notification-group-header {
    padding: 10px 15px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Dashboard Reminder Card */
.reminder-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    border-radius: 15px;
    overflow: hidden;
}

.reminder-card .card-header {
    background: rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 15px 20px;
}

.reminder-card .card-header h5 {
    margin: 0;
    color: white;
}

.reminder-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

.reminder-list-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    gap: 12px;
}

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

.reminder-list-item .icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reminder-list-item .content {
    flex: 1;
}

.reminder-list-item .content .title {
    font-weight: 500;
    margin-bottom: 2px;
}

.reminder-list-item .content .meta {
    font-size: 0.8rem;
    opacity: 0.7;
}

.reminder-list-item .amount {
    font-weight: 600;
    font-size: 1.1rem;
}

@media (max-width: 575.98px) {
    .notification-dropdown {
        width: 320px;
        right: -50px;
    }
}
