:root {
    /* Colors */
    --bg-darker: #0D121F;
    --bg-main: #111827;
    --bg-card: #1C2533;
    --bg-sidebar: #111827;
    
    --primary: #14B8A6;
    --primary-hover: #0D9488;
    --primary-glow: rgba(20, 184, 166, 0.15);
    
    --text-main: #FFFFFF;
    --text-dim: #94A3B8;
    --text-muted: #64748B;
    
    --border: rgba(255, 255, 255, 0.04);
    --border-bright: rgba(255, 255, 255, 0.08);
    
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
    
    /* Spacing & Sizing */
    --sidebar-width: 260px;
    --topbar-height: 70px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.2);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.3);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-darker);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

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

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    padding: 24px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.logo-text h1 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.logo-text span {
    font-size: 12px;
    color: var(--text-dim);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--border-bright);
    border-radius: 10px;
}

.nav-section-title {
    padding: 24px 12px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

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

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

.nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    text-decoration: none;
    color: var(--text-dim);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.nav-item.active a {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.nav-item:not(.active) a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.nav-item i {
    width: 18px;
    height: 18px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: var(--radius-md);
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 11px;
    color: var(--text-dim);
}

.logout-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s;
}

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

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.top-bar {
    height: var(--topbar-height);
    background-color: var(--bg-sidebar);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    width: 400px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.search-container:focus-within {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.search-container i {
    color: var(--text-muted);
    width: 18px;
}

.search-container input {
    background: transparent;
    border: none;
    color: white;
    outline: none;
    width: 100%;
    font-size: 14px;
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    position: relative;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background-color: var(--danger);
    border: 2px solid var(--bg-sidebar);
    border-radius: 50%;
}

.v-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 14px;
    border-radius: 20px;
}

.status-label {
    font-size: 13px;
    color: var(--text-dim);
}

.status-value.active {
    color: var(--primary);
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* Dashboard Content Viewport */
.dashboard-viewport {
    padding: 32px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
}

.title-group h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.title-group p {
    color: var(--text-dim);
}

.header-actions {
    display: flex;
    gap: 12px;
}

.export-menu-wrapper {
    position: relative;
}

.export-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    background: linear-gradient(180deg, rgba(28, 37, 51, 0.98), rgba(17, 24, 39, 0.98));
    border: 1px solid var(--border-bright);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 120;
    overflow: hidden;
}

.export-popover[hidden] {
    display: none;
}

.export-popover-head {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 700;
}

.export-option {
    width: 100%;
    background: transparent;
    color: var(--text-main);
    border: none;
    padding: 11px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.export-option:hover {
    background: rgba(255, 255, 255, 0.06);
}

.export-option small {
    color: var(--text-muted);
    font-size: 11px;
}

.btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid var(--border-bright);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--border-bright);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.stat-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon-box.blue { background: rgba(59, 130, 246, 0.15); color: #3B82F6; }
.stat-icon-box.orange { background: rgba(245, 158, 11, 0.15); color: #F59E0B; }
.stat-icon-box.green { background: rgba(16, 185, 129, 0.15); color: #10B981; }
.stat-icon-box.teal { background: rgba(20, 184, 166, 0.15); color: #14B8A6; }

.stat-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.05em;
}

.stat-badge.blue { background: rgba(59, 130, 246, 0.1); color: #3B82F6; border: 1px solid rgba(59, 130, 246, 0.2); }
.stat-badge.orange { background: rgba(245, 158, 11, 0.1); color: #F59E0B; border: 1px solid rgba(245, 158, 11, 0.2); }
.stat-badge.green { background: rgba(16, 185, 129, 0.1); color: #10B981; border: 1px solid rgba(16, 185, 129, 0.2); }
.stat-badge.teal { background: rgba(20, 184, 166, 0.1); color: #14B8A6; border: 1px solid rgba(20, 184, 166, 0.2); }

.stat-label {
    display: block;
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
}

.trend-up { color: var(--success); }
.trend-down { color: var(--warning); }
.trend-optimized { color: var(--primary); }

/* Grid for Charts */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.grid-col-8 { grid-column: span 8; }
.grid-col-4 { grid-column: span 4; }

.chart-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border);
    height: 100%;
}

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

.card-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.card-meta {
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 6px;
}

/* Circular Progress Custom Stylings */
.progress-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.circular-progress-container {
    width: 180px;
    height: 180px;
}

.circular-progress {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circular-progress svg {
    width: 100%;
    height: 100%;
    transform: rotate(0deg);
}

.progress-inner {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.percentage {
    font-size: 36px;
    font-weight: 700;
}

.progress-inner .label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-dim);
    letter-spacing: 0.1em;
}

.progress-stats {
    width: 100%;
}

.mini-progress-item {
    margin-bottom: 16px;
}

.item-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 8px;
}

.item-header span:first-child { color: var(--text-dim); }
.item-header span:last-child { font-weight: 600; color: var(--primary); }

.progress-bar-bg {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--primary);
    border-radius: 10px;
}

/* Table Card */
.table-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border);
}

.view-all {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.view-all:hover {
    text-decoration: underline;
}

.table-container {
    overflow-x: auto;
}

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

th {
    text-align: left;
    padding: 16px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

.user-meta {
    display: flex;
    flex-direction: column;
}

.user-role-label {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid transparent;
    color: var(--text-muted);
}

.user-role-label.active {
    color: #60A5FA;
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.3);
}

.user-role-label.passive {
    color: #F87171;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
}

.role-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.level-indicator {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.icon-btn.sm {
    padding: 6px;
}

.icon-btn.sm i {
    width: 16px;
    height: 16px;
}

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

.btn.sm {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 14px;
    white-space: nowrap;
}

.btn.sm i,
.btn.sm svg {
    width: 16px;
    height: 16px;
}

.btn.sm.icon-only {
    width: 52px;
    justify-content: center;
    padding: 8px;
}

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.action-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #93C5FD;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid transparent;
}

.status-pill.warning {
    color: #F59E0B;
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
}

.status-pill.success {
    color: #10B981;
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
}

.status-pill.teal {
    color: #14B8A6;
    background: rgba(20, 184, 166, 0.1);
    border-color: rgba(20, 184, 166, 0.2);
}

.status-pill.blue {
    color: #3B82F6;
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
}

.status-pill.info {
    color: #60A5FA;
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.25);
}

.status-pill.primary {
    color: #C4B5FD;
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.25);
}

.status-pill.danger {
    color: #F87171;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
}

.issue-desc {
    display: inline-block;
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Filter Select */
.filter-select {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 500;
    outline: none;
    cursor: pointer;
}

.card-actions {
    display: flex;
    gap: 12px;
}

.search-container.mini {
    width: auto;
    padding: 6px 12px;
}

.enterprise-pagination {
    border-top: 1px solid var(--border);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.enterprise-pagination-summary {
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 500;
}

.enterprise-pagination-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.enterprise-page-btn {
    border: 1px solid var(--border-bright);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    min-width: 34px;
    height: 32px;
    border-radius: 9px;
    padding: 0 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.enterprise-page-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
}

.enterprise-page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.enterprise-page-btn.nav {
    min-width: 52px;
}

.enterprise-page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

@media (max-width: 920px) {
    .enterprise-pagination {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Modal Styling */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-card);
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-bright);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
}

.close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: white;
}

.modal-form {
    padding: 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dim);
}

.form-group input, 
.form-group select,
.form-group textarea {
    background: #1F2937; /* Slightly lighter than card bg for contrast */
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: white;
    font-size: 14px;
    outline: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

.form-group input:focus, 
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background: #242F3F;
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

.customer-extra-fields {
    grid-column: span 2;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.customer-extra-fields[hidden] {
    display: none !important;
}

.enterprise-picker {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

#customerEnterpriseSelect {
    min-height: 46px;
    background: #1F2937;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: white;
    padding: 12px 16px;
    font-size: 14px;
}

#customerEnterpriseSelect option {
    padding: 8px;
    border-radius: 6px;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
}

.enterprise-dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: #1e293b; /* Koyu tema uyumlu */
    border: 1px solid #334155;
    border-radius: 6px;
    z-index: 1000;
    display: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

.enterprise-item {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 13px;
    color: #e2e8f0;
    border-bottom: 1px solid #334155;
}

.enterprise-item:hover {
    background: #0ea5e9;
    color: white;
}

.enterprise-item strong {
    display: block;
}

@media (max-width: 820px) {
    .customer-extra-fields {
        grid-template-columns: 1fr;
    }

    .enterprise-picker {
        grid-template-columns: 1fr;
    }
}

.selected-enterprise-pill {
    background: rgba(14, 165, 233, 0.15);
    color: #0ea5e9;
    border: 1px solid rgba(14, 165, 233, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.selected-enterprise-pill i {
    cursor: pointer;
    font-size: 14px;
    transition: color 0.2s;
}

.selected-enterprise-pill i:hover {
    color: #ef4444;
}

#selectedEnterprisesContainer::-webkit-scrollbar {
    width: 5px;
}
#selectedEnterprisesContainer::-webkit-scrollbar-thumb {
    background: rgba(14, 165, 233, 0.3);
    border-radius: 10px;
}

/* Dropdown modalın üzerine binmeli, modalı itmemeli */
.enterprise-dropdown {
    position: absolute;
    top: 100%; /* Input'un hemen altından başlasın */
    left: 0;
    right: 0;
    background: #1e293b; /* Modal rengine uygun koyu ton */
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 8px;
    max-height: 250px; /* Liste çok uzunsa kendi içinde scroll olsun */
    overflow-y: auto;
    z-index: 9999; /* Her şeyin üstünde görünsün */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    margin-top: 4px;
    display: none; /* JavaScript açacak */
}

/* Arama input'unun olduğu kapsayıcıya bunu ver ki dropdown ona göre konumlansın */
.search-input-wrapper {
    position: relative; 
}



.modal-footer {
    padding: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 15px
}

/* Breadcrumb */
.breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    gap: 8px;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Role Selector Bar */
.role-selector-bar {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.role-tab {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.role-tab.active {
    background: var(--bg-card);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.role-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

/* Custom Checkbox */
.custom-check {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
}

.custom-check input {
    opacity: 0;
    width: 0;
    height: 0;
}

.custom-check span {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-bright);
    border-radius: 4px;
    transition: all 0.2s;
    cursor: pointer;
}

.custom-check input:checked ~ span {
    background-color: var(--primary);
    border-color: var(--primary);
}

.custom-check span:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-check input:checked ~ span:after {
    display: block;
}

/* Permission Table */
.permission-table th {
    background: rgba(255, 255, 255, 0.02);
}

.module-name {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    color: var(--text-main);
}

.module-name i {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

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

/* Work Order Specifics */
.order-id {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    color: var(--primary);
    background: rgba(20, 184, 166, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.order-title-cell {
    display: flex;
    flex-direction: column;
}

.order-title {
    font-weight: 600;
    color: var(--text-main);
}

.order-sub {
    font-size: 12px;
    color: var(--text-muted);
}

.priority-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
}

.priority-tag.critical { background: rgba(239, 68, 68, 0.15); color: #EF4444; border: 1px solid rgba(239, 68, 68, 0.2); }
.priority-tag.high { background: rgba(245, 158, 11, 0.15); color: #F59E0B; border: 1px solid rgba(245, 158, 11, 0.2); }
.priority-tag.medium { background: rgba(59, 130, 246, 0.15); color: #3B82F6; border: 1px solid rgba(59, 130, 246, 0.2); }
.priority-tag.low { background: rgba(148, 163, 184, 0.15); color: #94A3B8; border: 1px solid rgba(148, 163, 184, 0.2); }

.full-width { grid-column: span 2; }
.bg-muted { background: rgba(255,255,255,0.02) !important; color: var(--text-muted) !important; cursor: not-allowed; }

.audit-note {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.audit-note i { width: 14px; height: 14px; }

.modal-btns {
    display: flex;
    gap: 12px;
}

/* Parametric Screen Layout */
.param-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    align-items: start;
}

.param-sidebar {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.param-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    text-align: left;
}

.param-nav-item i {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.param-nav-item.active {
    background: rgba(20, 184, 166, 0.1);
    color: var(--primary);
}

.param-nav-item.active i {
    color: var(--primary);
}

.param-nav-item:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.no-margin { margin: 0; }

/* Maintenance & Form Styles */
.form-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
}

.form-status i { width: 16px; height: 16px; }

.file-upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.file-upload-zone:hover {
    border-color: var(--primary);
    background: rgba(20, 184, 166, 0.05);
}

.file-upload-zone i {
    width: 32px;
    height: 32px;
    color: var(--text-muted);
}

.file-upload-zone p {
    font-size: 14px;
    color: var(--text-main);
    font-weight: 500;
    margin: 0;
}

.file-upload-zone span {
    font-size: 12px;
    color: var(--text-muted);
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 8px;
}

.photo-placeholder {
    aspect-ratio: 4/3;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.maint-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.maint-info-box {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.maint-info-box label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.maint-info-box p {
    margin: 0;
    font-size: 14px;
}

.progress-bar-bg.small {
    height: 6px;
    margin-top: 4px;
}

.progress-bar-fill.danger {
    background: var(--danger);
}

.text-danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }
.text-muted { color: var(--text-muted) !important; }

/* Responsive Updates */
@media (max-width: 1400px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .grid-col-8, .grid-col-4 { grid-column: span 12; }
    .param-grid { grid-template-columns: 1fr; }
}

/* Reporting & Analytics Specifics */
.report-types-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.report-type-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.report-type-card i {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
}

.report-type-card span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dim);
}

.report-type-card:hover {
    border-color: var(--primary);
    background: rgba(20, 184, 166, 0.05);
}

.report-type-card.active {
    background: rgba(20, 184, 166, 0.1);
    border-color: var(--primary);
}

.report-type-card.active i { color: var(--primary); }
.report-type-card.active span { color: var(--primary); }

.sm-input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: white;
    padding: 8px 12px;
    font-size: 13px;
    width: 100%;
    outline: none;
}

.sm-input:focus { border-color: var(--primary); }

.bg-risk { background: rgba(239, 68, 68, 0.05) !important; }

@media (max-width: 1200px) {
    .report-types-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .report-types-grid { grid-template-columns: 1fr; }
}

/* Login View */
.login-page {
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background:
        radial-gradient(circle at 20% 15%, rgba(20, 184, 166, 0.2), transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(59, 130, 246, 0.16), transparent 40%),
        linear-gradient(135deg, #0A1020 0%, #111827 55%, #0D121F 100%);
}

.login-shell {
    width: min(1120px, 100%);
    height: min(640px, calc(100vh - 32px));
    max-height: calc(100vh - 32px);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    border-radius: 24px;
    overflow: auto;
    border: 1px solid var(--border-bright);
    box-shadow: 0 24px 50px rgba(2, 6, 23, 0.5);
    background: rgba(12, 18, 33, 0.55);
    backdrop-filter: blur(12px);
}

.login-brand-panel {
    position: relative;
    padding: 42px;
    border-right: 1px solid var(--border);
    background:
        linear-gradient(160deg, rgba(20, 184, 166, 0.14), rgba(20, 184, 166, 0) 45%),
        linear-gradient(20deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0) 35%);
}

.login-brand-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.login-badge {
    display: inline-flex;
    align-self: flex-start;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.12);
    border: 1px solid rgba(20, 184, 166, 0.28);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.login-logo-wrap {
    margin-top: 6px;
}

.login-logo-icon {
    width: 78px;
    height: 78px;
    border-radius: 18px;
    background: rgba(20, 184, 166, 0.16);
    border: 1px solid rgba(20, 184, 166, 0.24);
}

.login-brand-title {
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.01em;
    max-width: 540px;
}

.login-brand-copy {
    color: var(--text-dim);
    font-size: 16px;
    max-width: 500px;
}

.login-feature-list {
    display: grid;
    gap: 14px;
    margin-top: 4px;
}

.login-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
}

.feature-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: rgba(20, 184, 166, 0.15);
    flex-shrink: 0;
}

.feature-icon i {
    width: 18px;
    height: 18px;
}

.login-feature-item strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.login-feature-item p {
    margin: 0;
    color: var(--text-dim);
    font-size: 13px;
}

.login-panel-status {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    color: var(--text-dim);
    font-size: 13px;
}

.login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 42px;
}

.login-card {
    width: min(440px, 100%);
    background: rgba(16, 24, 40, 0.8);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
}

.login-card-header {
    margin-bottom: 20px;
}

.login-card-header h2 {
    font-size: 28px;
    margin-bottom: 6px;
}

.login-card-header p {
    color: var(--text-dim);
    font-size: 14px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-form-group {
    gap: 7px;
}

.login-input-wrap {
    position: relative;
}

.login-input-wrap > i,
.login-input-wrap > svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: var(--text-muted);
    pointer-events: none;
}

.login-input-wrap input {
    height: 46px;
    padding-left: 42px;
    padding-right: 42px;
    background: rgba(255, 255, 255, 0.04);
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    width: 28px;
    height: 28px;
    padding: 0;
    line-height: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.password-toggle:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.password-toggle i,
.password-toggle svg {
    width: 16px;
    height: 16px;
}

.caps-warning {
    font-size: 12px;
    color: var(--warning);
    display: none;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.caps-warning.visible {
    display: inline-flex;
}

.caps-warning i,
.caps-warning svg {
    width: 14px;
    height: 14px;
}

.login-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
}

.remember-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    font-size: 13px;
    cursor: pointer;
}

.remember-check input {
    accent-color: var(--primary);
}

.login-submit {
    width: 100%;
    justify-content: center;
}

.login-submit:disabled {
    opacity: 0.7;
    cursor: wait;
}

@media (max-width: 980px) {
    .login-page {
        padding: 18px;
    }

    .login-shell {
        grid-template-columns: 1fr;
        height: auto;
        max-height: none;
    }

    .login-brand-panel {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 28px;
    }

    .login-feature-list {
        grid-template-columns: 1fr;
    }

    .login-form-panel {
        padding: 28px;
    }
}

@media (max-width: 560px) {
    .login-page {
        padding: 12px;
        align-items: flex-start;
    }

    .login-brand-panel,
    .login-form-panel {
        padding: 20px;
    }

    .login-card {
        padding: 20px;
    }

    .login-card-header h2 {
        font-size: 24px;
    }

    .login-row {
        flex-direction: column;
        align-items: flex-start;
    }
}
