/* ====================================================
   ÜNİSAM – Ana Tasarım Sistemi (main.css)
   Renk Paleti: Kırmızı #C8102E, Siyah #0a0a12
   ==================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ─── CSS Değişkenleri ─── */
:root {
    --red:          #C8102E;
    --red-dark:     #a00d24;
    --red-light:    #e8294a;
    --red-glow:     rgba(200, 16, 46, 0.25);
    --bg:           #0a0a12;
    --bg2:          #12121e;
    --bg3:          #1a1a2e;
    --card:         rgba(26, 26, 46, 0.9);
    --border:       rgba(200, 16, 46, 0.2);
    --border-light: rgba(255, 255, 255, 0.07);
    --text:         #f0f0f5;
    --text-muted:   #9090aa;
    --text-faint:   #606078;
    --success:      #22c55e;
    --warning:      #f59e0b;
    --info:         #3b82f6;
    --danger:       #ef4444;
    --radius:       12px;
    --radius-lg:    18px;
    --shadow:       0 4px 24px rgba(0,0,0,0.4);
    --shadow-red:   0 8px 32px rgba(200,16,46,0.3);
    --transition:   0.2s ease;
}

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.3; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
p  { color: var(--text-muted); }

a { color: var(--red-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--red); }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 3px; }

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius);
    border: none;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--red);
    color: #fff;
    box-shadow: 0 4px 15px var(--red-glow);
}
.btn-primary:hover {
    background: var(--red-light);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--red-glow);
}

.btn-outline {
    background: transparent;
    color: var(--red);
    border: 1.5px solid var(--red);
}
.btn-outline:hover {
    background: var(--red-glow);
    color: var(--red-light);
    border-color: var(--red-light);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1.5px solid var(--border-light);
}
.btn-ghost:hover { background: var(--bg3); color: var(--text); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #16a34a; color: #fff; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }

.btn-warning { background: var(--warning); color: #000; }
.btn-warning:hover { background: #d97706; color: #000; }

.btn-sm { padding: 6px 14px; font-size: 0.82rem; border-radius: 8px; }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: var(--radius-lg); }

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ─── Cards ─── */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}
.card-title { font-size: 1.1rem; font-weight: 700; color: var(--text); }

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

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}
label .required { color: var(--red); margin-left: 3px; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 11px 16px;
    background: rgba(255,255,255,0.04);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    font-size: 0.92rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    appearance: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px var(--red-glow);
}

select option { background: var(--bg3); color: var(--text); }

textarea { resize: vertical; min-height: 90px; }

input::placeholder, textarea::placeholder { color: var(--text-faint); }

/* Checkbox & Radio */
.check-group { display: flex; align-items: flex-start; gap: 10px; }
.check-group input[type="checkbox"],
.check-group input[type="radio"] {
    width: 18px; height: 18px; min-width: 18px;
    accent-color: var(--red);
    margin-top: 2px;
}
.check-group label { font-size: 0.88rem; font-weight: 400; color: var(--text-muted); margin-bottom: 0; }

/* Form row (2 col) */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

/* Grid Responsive Utilities */
.grid-responsive-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.grid-responsive-2-alt { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) {
    .grid-responsive-2, .grid-responsive-2-alt { grid-template-columns: 1fr; }
}

/* ─── Tables ─── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); border: 1px solid var(--border-light); }

table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 600px; }
@media (max-width: 768px) {
    table { min-width: 800px; } /* Force horizontal scroll on mobile */
    table th, table td { white-space: nowrap; }
}

thead th {
    background: var(--bg3);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
    vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }

tbody tr:hover { background: rgba(255,255,255,0.025); }

/* ─── Badges ─── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-success { background: rgba(34,197,94,0.15); color: #4ade80; }
.badge-danger  { background: rgba(239,68,68,0.15);  color: #f87171; }
.badge-warning { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge-info    { background: rgba(59,130,246,0.15); color: #60a5fa; }
.badge-red     { background: rgba(200,16,46,0.15);  color: var(--red-light); }
.badge-gray    { background: rgba(255,255,255,0.08); color: var(--text-muted); }

/* ─── Alerts ─── */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 0.88rem;
    margin-bottom: 16px;
}
.alert-success { background: rgba(34,197,94,0.1);   border: 1px solid rgba(34,197,94,0.3);   color: #4ade80; }
.alert-danger  { background: rgba(239,68,68,0.1);   border: 1px solid rgba(239,68,68,0.3);   color: #f87171; }
.alert-warning { background: rgba(245,158,11,0.1);  border: 1px solid rgba(245,158,11,0.3);  color: #fbbf24; }
.alert-info    { background: rgba(59,130,246,0.1);  border: 1px solid rgba(59,130,246,0.3);  color: #60a5fa; }

/* ─── Stat Cards ─── */
.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-red); }
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: var(--red);
}
.stat-value { font-size: 2rem; font-weight: 800; color: var(--text); line-height: 1; }
.stat-label { font-size: 0.82rem; color: var(--text-muted); margin-top: 6px; font-weight: 500; }
.stat-icon  { font-size: 2rem; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); opacity: 0.15; }

/* ─── Loading Spinner ─── */
.spinner {
    display: inline-block;
    width: 20px; height: 20px;
    border: 2px solid rgba(200,16,46,0.3);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Utilities ─── */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-muted   { color: var(--text-muted); }
.text-danger  { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-red     { color: var(--red-light); }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-2 { gap: 12px; }
.gap-3 { gap: 20px; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

.w-100 { width: 100%; }
.hidden { display: none !important; }

/* ─── Modal ─── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 560px;
    width: 100%;
    box-shadow: var(--shadow);
    animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.4rem; cursor: pointer; transition: color var(--transition); }
.modal-close:hover { color: var(--red); }

/* ─── Responsive Grid ─── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px)  { .grid-3, .grid-4 { grid-template-columns: 1fr; } }
@media (max-width: 600px)  { .grid-2 { grid-template-columns: 1fr; } }

/* ─── Pagination ─── */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 20px; }
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 8px;
    font-size: 0.88rem; font-weight: 500;
    border: 1.5px solid var(--border-light);
    color: var(--text-muted);
    transition: all var(--transition);
    text-decoration: none;
}
.pagination a:hover { border-color: var(--red); color: var(--red); }
.pagination .active { background: var(--red); border-color: var(--red); color: #fff; }

/* ─── File Drop Area ─── */
.file-drop {
    border: 2px dashed var(--border-light);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: rgba(255,255,255,0.02);
}
.file-drop:hover, .file-drop.dragover {
    border-color: var(--red);
    background: var(--red-glow);
}
.file-drop-icon { font-size: 2.5rem; margin-bottom: 10px; opacity: 0.5; }
.file-drop p { font-size: 0.88rem; }
.file-drop span { color: var(--red-light); font-weight: 600; }

/* ─── Signature Pad ─── */
.signature-container {
    border: 2px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    position: relative;
}
.signature-container canvas { display: block; touch-action: none; width: 100%; }
.signature-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg3);
    border-top: 1px solid var(--border-light);
}

/* ─── Search Bar ─── */
.search-bar {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255,255,255,0.04);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color var(--transition);
}
.search-bar:focus-within { border-color: var(--red); }
.search-bar input {
    border: none;
    background: transparent;
    padding: 10px 14px;
    flex: 1;
    box-shadow: none;
}
.search-bar input:focus { box-shadow: none; }
.search-bar button {
    background: var(--red);
    border: none;
    color: #fff;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.9rem;
}

/* ─── Toast Notifications ─── */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    min-width: 280px;
    max-width: 380px;
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 500;
    box-shadow: var(--shadow);
    animation: toastIn 0.3s ease;
    cursor: pointer;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
.toast-success { background: #166534; border-left: 4px solid var(--success); color: #dcfce7; }
.toast-danger  { background: #7f1d1d; border-left: 4px solid var(--danger);  color: #fee2e2; }
.toast-info    { background: #1e3a5f; border-left: 4px solid var(--info);    color: #dbeafe; }
.toast-warning { background: #78350f; border-left: 4px solid var(--warning); color: #fef3c7; }

/* ─── Empty State ─── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-faint);
}
.empty-state-icon { font-size: 3.5rem; margin-bottom: 16px; }
.empty-state h3 { color: var(--text-muted); margin-bottom: 8px; }
. t a b l e - r e s p o n s i v e  
   w i d t h :   1 0 0 % ;   o v e r f l o w - x :   a u t o ;   - w e b k i t - o v e r f l o w - s c r o l l i n g :   t o u c h ;    
 