:root {
    --bg-color: #f3f6f9;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    
    /* Status Colors */
    --status-waiting: #ef4444; /* Red */
    --status-ready: #10b981; /* Green */
    --status-partial: #f59e0b; /* Orange/Yellow */
    
    --border-radius: 16px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

.app-container {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* View System */
.view-section {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease-out;
}

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

.hidden {
    display: none !important;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}
.modal-content {
    background: white;
    padding: 24px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 340px;
    box-shadow: var(--shadow-md);
}

/* Header */
.app-header {
    background: var(--primary);
    color: white;
    padding: 24px 20px 32px;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    box-shadow: var(--shadow-md);
}

.header-content h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.header-content .subtitle {
    font-size: 14px;
    opacity: 0.9;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Common Padding */
.content-padding {
    padding: 20px;
}
.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-main);
}

/* Admin / Forms */
.admin-card {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.admin-card h3 {
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.styled-input, .styled-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}
.styled-input:focus, .styled-select:focus {
    border-color: var(--primary);
}

.primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.primary-btn:hover {
    background: var(--primary-hover);
}
.primary-btn.outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}
.primary-btn.outline:hover {
    background: #eff6ff;
}

/* Center Grid (Home) */
.center-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.center-btn {
    background: white;
    border: none;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    text-align: left;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.center-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.center-btn i {
    color: var(--primary);
    font-size: 20px;
}

/* Search Box */
.search-container {
    padding: 0 20px;
    margin-top: -24px;
}

.search-box {
    background: white;
    border-radius: var(--border-radius);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-md);
}

.search-icon {
    color: var(--text-muted);
    font-size: 18px;
    margin-right: 12px;
}

#searchInput {
    flex: 1;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 16px;
    color: var(--text-main);
}

.clear-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

/* Filters */
.filter-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    overflow-x: auto;
    scrollbar-width: none;
}
.filter-container::-webkit-scrollbar { display: none; }

.filter-divider {
    width: 2px;
    height: 24px;
    background: #e2e8f0;
    flex-shrink: 0;
}

.filter-btn {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 6px 10px;
    border-radius: 20px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

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

/* List Container */
.list-container {
    padding: 0 20px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Case Card */
.case-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-left: 4px solid var(--status-waiting);
}

.case-card.status-partial { border-left-color: var(--status-partial); }
.case-card.status-ready { border-left-color: var(--status-ready); }

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.badge-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dosya-no {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 700;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.uzman-badge {
    font-size: 12px;
    color: #4338ca;
    font-weight: 600;
    background: #e0e7ff;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.time-badge {
    font-size: 12px;
    color: #0f766e;
    font-weight: 600;
    background: #ccfbf1;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    background: #fee2e2;
    color: #991b1b;
}

.case-card.status-partial .status-badge { background: #fef3c7; color: #92400e; }
.case-card.status-ready .status-badge { background: #d1fae5; color: #065f46; }
.case-card.status-completed { border-left-color: #94a3b8; opacity: 0.8; }
.case-card.status-completed .status-badge { background: #e2e8f0; color: #475569; }

/* Buttons */
.action-btn {
    border: 2px solid #e2e8f0;
    background: transparent;
    padding: 10px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.action-btn i { font-size: 18px; }

.action-btn.checked {
    background: #eff6ff;
    border-color: var(--primary);
    color: var(--primary);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}
.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}
