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

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --border-color: #e2e8f0;
    --text-color: #334155;
    --text-light: #64748b;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--light-color);
    line-height: 1.6;
}

/* Login Sayfası */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.login-box h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
    text-align: center;
}

.login-box h2 {
    color: var(--text-light);
    font-size: 16px;
    font-weight: normal;
    margin-bottom: 30px;
    text-align: center;
}

/* Header */
.main-header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    border-bottom: 1px solid var(--border-color);
}

.header-left .logo {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
}

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

.header-search {
    position: relative;
}

.search-toggle {
    background: var(--light-color);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.search-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    display: none;
    z-index: 1000;
}

.search-dropdown.active {
    display: block;
}

.search-dropdown input {
    width: 100%;
    padding: 12px;
    border: none;
    border-bottom: 1px solid var(--border-color);
    border-radius: 8px 8px 0 0;
    font-size: 14px;
}

.search-results {
    max-height: 300px;
    overflow-y: auto;
}

.search-result-item {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.search-result-item:hover {
    background: var(--light-color);
}

.search-no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-light);
}

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

.icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-color);
}

.icon-btn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

.user-menu {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    display: none;
}

.user-menu:hover .user-dropdown {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-color);
    transition: background 0.2s;
}

.user-dropdown a:hover {
    background: var(--light-color);
}

.header-bottom {
    padding: 10px 30px;
    background: var(--light-color);
    border-bottom: 1px solid var(--border-color);
}

.selected-building {
    font-size: 14px;
    color: var(--text-light);
}

/* Ana Container */
.main-container {
    display: flex;
    min-height: calc(100vh - 120px);
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid var(--border-color);
    padding: 20px 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    background: var(--light-color);
    border-left-color: var(--primary-color);
}

.sidebar-nav a.active {
    background: var(--light-color);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--dark-color);
}

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

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card-warning {
    border-left: 4px solid var(--warning-color);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-icon-blue {
    background: var(--primary-color);
}

.stat-icon-green {
    background: var(--success-color);
}

.stat-icon-red {
    background: var(--danger-color);
}

.stat-icon-orange {
    background: var(--warning-color);
}

.stat-content h3 {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-color);
}

.stat-subvalue {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 4px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.dashboard-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.dashboard-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--dark-color);
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background: #1d4ed8;
}

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

.btn-secondary:hover {
    background: #475569;
}

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

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

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

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

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

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

.data-table thead {
    background: var(--light-color);
}

.data-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.data-table tbody tr:hover {
    background: var(--light-color);
}

.text-center {
    text-align: center;
}

.text-danger {
    color: var(--danger-color);
}

.text-success {
    color: var(--success-color);
}

.text-warning {
    color: var(--warning-color);
}

/* Card Footer */
.card-footer {
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
}

/* Icons */
.icon-dashboard::before { content: "📊"; }
.icon-building::before { content: "🏢"; }
.icon-debt::before { content: "💰"; }
.icon-accounting::before { content: "📈"; }
.icon-income::before { content: "💵"; }
.icon-expense::before { content: "💸"; }
.icon-cash::before { content: "💳"; }
.icon-message::before { content: "💬"; }
.icon-work::before { content: "🔧"; }
.icon-supplier::before { content: "🚚"; }
.icon-report::before { content: "📋"; }
.icon-enforcement::before { content: "⚖️"; }
.icon-sms::before { content: "📱"; }
.icon-user::before { content: "👤"; }
.icon-search::before { content: "🔍"; }
.icon-bell::before { content: "🔔"; }
.icon-chevron-down::before { content: "▼"; }
.icon-payment::before { content: "💸"; }
.icon-alert::before { content: "⚠️"; }
.icon-print::before { content: "🖨️"; }
.icon-pdf::before { content: "📄"; }
.icon-log::before { content: "📝"; }
.icon-bank::before { content: "🏦"; }

/* Hamburger Menü Butonu */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-right: 15px;
}

.hamburger-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Sidebar Overlay (mobil için) */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Yazdırma stilleri */
@media print {
    .sidebar, .main-header, .page-header button, .btn, .alert, .hamburger-btn, .submenu, form {
        display: none !important;
    }
    
    .main-container {
        display: block !important;
    }
    
    .main-content {
        padding: 0 !important;
        margin: 0 !important;
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    .dashboard-card, .stat-card {
        page-break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .stats-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }
    
    .stat-card {
        flex: 1 1 150px !important;
        min-width: 150px !important;
    }
    
    .data-table {
        font-size: 12px !important;
    }
    
    .page-header {
        margin-bottom: 20px !important;
        border-bottom: 2px solid #333 !important;
        padding-bottom: 10px !important;
    }
    
    .page-header h2 {
        margin: 0 !important;
    }
    
    body {
        background: white !important;
    }
}

/* Responsive - Tablet */
@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        width: 220px;
    }
    
    .sidebar-nav a {
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* Responsive - Mobil */
@media (max-width: 768px) {
    .hamburger-btn {
        display: flex;
    }
    
    .header-left {
        display: flex;
        align-items: center;
    }
    
    .header-left .logo {
        font-size: 16px;
    }
    
    .header-top {
        padding: 12px 15px;
    }
    
    .header-bottom {
        padding: 8px 15px;
    }
    
    .header-search {
        display: none;
    }
    
    .header-actions .user-btn span {
        display: none;
    }
    
    .main-container {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        z-index: 999;
        transition: left 0.3s ease;
        overflow-y: auto;
        padding-top: 20px;
        box-shadow: var(--shadow-lg);
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .sidebar-nav a {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .main-content {
        padding: 15px;
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .stat-value {
        font-size: 22px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-card {
        padding: 15px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .page-header h2 {
        font-size: 20px;
    }
    
    .data-table {
        font-size: 13px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 6px;
    }
    
    .btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .btn-sm {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    body.menu-open {
        overflow: hidden;
    }
}

/* Responsive - Küçük Mobil */
@media (max-width: 480px) {
    .header-left .logo {
        font-size: 14px;
    }
    
    .icon-btn {
        width: 36px;
        height: 36px;
    }
    
    .building-selector-dropdown {
        right: -50px;
        min-width: 180px;
    }
    
    .user-dropdown {
        right: -10px;
    }
}


