*{box-sizing:border-box}
:root{
    --bg:#080808;
    --panel:#121212;
    --panel-2:#181818;
    --line:#2a2a2a;
    --text:#f8fafc;
    --muted:#9ca3af;
    --yellow:#facc15;
    --yellow-2:#eab308;
    --red:#b91c1c;
    --green:#22c55e;
}
body{
    margin:0;
    min-height:100vh;
    background:var(--bg);
    color:var(--text);
    font-family:"Segoe UI",Arial,sans-serif;
    display:flex;
}
a{color:inherit}
.sidebar{
    width:286px;
    min-height:100vh;
    max-height:100vh;
    overflow:hidden;
    background:#0f0f0f;
    border-right:1px solid var(--line);
    padding:26px 18px;
    position:fixed;
    left:0;
    top:0;
    display:flex;
    flex-direction:column;
    scrollbar-width:none;
}
.sidebar::-webkit-scrollbar{width:0;height:0}
.brand{display:flex;align-items:center;gap:12px;margin-bottom:26px}
.logo-icon{
    width:42px;
    height:28px;
    background:linear-gradient(135deg,var(--yellow),#f97316);
    clip-path:polygon(18% 0,100% 0,82% 100%,0 100%);
}
.brand h1{font-size:21px;margin:0}
.brand p{margin:4px 0 0;color:var(--muted);font-size:12px}
.nav{
    display:flex;
    flex-direction:column;
    gap:6px;
    flex:1;
    overflow-y:auto;
    padding-right:4px;
    scrollbar-width:thin;
    scrollbar-color:#3f3f46 transparent;
}
.nav::-webkit-scrollbar{width:6px}
.nav::-webkit-scrollbar-track{background:transparent}
.nav::-webkit-scrollbar-thumb{background:#3f3f46;border-radius:999px}
.nav a,.sidebar-user a{
    text-decoration:none;
    color:var(--text);
    padding:12px 14px;
    border-radius:8px;
    font-weight:800;
    transition:.15s ease;
}
.nav a:hover,.sidebar-user a:hover{background:var(--yellow);color:#080808}
.sidebar-user{
    position:static;
    border-top:1px solid var(--line);
    padding-top:16px;
    margin-top:18px;
}
.sidebar-user span,.sidebar-user small{display:block}
.sidebar-user span{color:var(--yellow);font-weight:900}
.sidebar-user small{color:var(--muted);margin-top:4px}
.sidebar-user a{display:block;background:#1d1d1d;margin-top:12px}
.content{
    margin-left:286px;
    width:calc(100% - 286px);
    padding:32px;
}
.page-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:16px;
    margin-bottom:22px;
}
.header-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
h1{margin:0;font-size:34px}
h2{margin:0 0 18px;color:var(--yellow);font-size:22px}
.desc{color:var(--muted);font-size:16px;margin:8px 0 0}
.panel,.metric,.record-card{
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:8px;
}
.panel{padding:22px;margin-bottom:22px}
.panel-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:14px;
    margin-bottom:14px;
}
.panel-header h2{margin:0}
.panel-header a{color:var(--yellow);font-weight:800;text-decoration:none}
.metric-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px;
    margin-bottom:22px;
}
.metric{padding:20px}
.metric span{font-size:38px;font-weight:900;color:var(--yellow)}
.metric p{color:var(--muted);font-weight:800;margin:8px 0 0}
.metric.danger span{color:#f87171}
.metric.warning span{color:#fbbf24}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.record-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.record-card{padding:18px;background:var(--panel-2)}
.record-card.wide{margin-bottom:12px}
.record-title{display:flex;align-items:center;justify-content:space-between;gap:12px}
.record-title a,.record-title strong{
    color:var(--yellow);
    font-size:22px;
    font-weight:900;
    text-decoration:none;
}
.record-title span{
    border:1px solid var(--line);
    border-radius:999px;
    padding:6px 10px;
    color:var(--muted);
    font-size:12px;
    font-weight:800;
}
.status-badge{
    letter-spacing:.04em;
    color:#f8fafc!important;
    border-color:#3f3f46!important;
    background:#27272a;
}
.status-yeni,.status-yapilacak,.status-odenmedi,.status-disarida,.status-eksik,.status-suresi_gecti,.status-borc_var,.status-iptal{
    background:rgba(185,28,28,.22)!important;
    border-color:#ef4444!important;
    color:#fecaca!important;
}
.status-inceleniyor,.status-beklemede,.status-itiraz,.status-yaklasiyor,.status-hazirlaniyor,.status-noter,.status-tuhim,.status-bekliyor{
    background:rgba(250,204,21,.18)!important;
    border-color:#facc15!important;
    color:#fde68a!important;
}
.status-cevaplandi,.status-odendi,.status-gecerli,.status-tamamlandi,.status-iade,.status-kapandi,.status-aktif,.status-temiz{
    background:rgba(34,197,94,.18)!important;
    border-color:#22c55e!important;
    color:#bbf7d0!important;
}
.status-pasif{
    background:rgba(113,113,122,.22)!important;
    border-color:#71717a!important;
}
.record-card p,.list-row span,.timeline-row span{color:var(--muted)}
.tag-line{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.tag-line span{
    background:#222;
    color:#d1d5db;
    border:1px solid var(--line);
    border-radius:999px;
    padding:6px 10px;
    font-size:12px;
    font-weight:800;
}
.record-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:14px}
.primary-btn,.secondary-btn,.edit-btn,.danger-btn,.add-form button,.search-form button,.compact-form button{
    border:none;
    border-radius:8px;
    padding:12px 16px;
    font-weight:900;
    text-decoration:none;
    cursor:pointer;
}
.primary-btn,.add-form button,.search-form button,.compact-form button{background:var(--yellow);color:#080808}
.primary-btn:hover,.add-form button:hover,.search-form button:hover,.compact-form button:hover{background:var(--yellow-2)}
.secondary-btn,.edit-btn{background:#242424;color:white}
.danger-btn{background:var(--red);color:white}
.search-form,.compact-form{display:flex;gap:12px}
.search-form input,.compact-form input{flex:1}
.status-form{display:flex;gap:10px;margin-top:14px}
.bulk-form{display:flex;gap:10px;margin-bottom:16px;align-items:center}
.bulk-form select{max-width:230px}
.status-form select{max-width:220px}
.status-form button{
    border:none;
    border-radius:8px;
    background:#242424;
    color:white;
    font-weight:900;
    padding:0 14px;
    cursor:pointer;
}
.type-picker{max-width:420px;margin-top:10px}
.hidden{display:none!important}
.file-link{
    display:inline-flex;
    margin:8px 0;
    color:#080808;
    background:var(--yellow);
    text-decoration:none;
    font-weight:900;
    border-radius:8px;
    padding:9px 12px;
}
.quick-actions{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px;
}
.quick-actions a{
    display:block;
    text-decoration:none;
    background:#202020;
    border:1px solid var(--line);
    border-radius:8px;
    padding:13px;
    font-weight:900;
    color:var(--text);
}
.quick-actions a:hover{border-color:var(--yellow);color:var(--yellow)}
.doc-preview{
    width:100%;
    max-width:260px;
    max-height:180px;
    object-fit:cover;
    border:1px solid var(--line);
    border-radius:8px;
    margin-top:8px;
}
.alert-panel{border-color:#3a2d12}
.add-form{display:flex;flex-direction:column;gap:14px}
.form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
label,.form-section-title{color:var(--yellow);font-weight:900}
.form-section-title{margin-top:6px}
input,select,textarea{
    width:100%;
    border:1px solid #333;
    border-radius:8px;
    background:#1a1a1a;
    color:white;
    padding:13px 14px;
    font-size:15px;
    outline:none;
}
textarea{min-height:150px;resize:vertical;font-family:inherit}
.small-textarea{min-height:90px}
input:focus,select:focus,textarea:focus{border-color:var(--yellow)}
.list-row,.timeline-row{
    display:flex;
    justify-content:space-between;
    gap:16px;
    border-top:1px solid var(--line);
    padding:14px 0;
}
.list-row:first-of-type,.timeline-row:first-of-type{border-top:none}
.list-row strong,.timeline-row strong{color:var(--text)}
.info-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.info-grid div{background:#1a1a1a;border:1px solid var(--line);border-radius:8px;padding:14px}
.info-grid small{display:block;color:var(--muted);margin-bottom:6px}
.info-grid strong{color:var(--yellow)}
.info-grid span{display:block;color:var(--muted);margin-top:5px}
.document-status-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.document-status{background:#1a1a1a;border:1px solid var(--line);border-radius:8px;padding:16px}
.document-status{text-decoration:none}
.document-status:hover{border-color:var(--yellow)}
.document-status small,.document-status span{display:block;color:var(--muted)}
.document-status strong{display:block;color:var(--yellow);font-size:20px;margin:8px 0}
.note{background:#202020;border-left:3px solid var(--yellow);padding:12px;border-radius:8px}
.empty{color:var(--muted)}
.success-message{color:var(--green);font-weight:900}
.error-message{color:var(--yellow);font-weight:900}
.record-check{width:20px;height:20px;accent-color:var(--yellow)}
.priority-acil{border-color:#ef4444}
.priority-yuksek{border-color:#f59e0b}
.login-page{display:grid;place-items:center;padding:24px}
.login-shell{width:100%;max-width:430px}
.login-card{background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:30px}
.login-brand{margin-bottom:28px}
.login-card h2{margin:0;font-size:30px}
.login-form{display:flex;flex-direction:column;gap:12px;margin-top:24px}
.login-form button{height:52px;border:none;border-radius:8px;background:var(--yellow);font-weight:900;cursor:pointer}
.remember-row{
    display:flex;
    align-items:center;
    gap:10px;
    color:var(--text);
    cursor:pointer;
}
.remember-row input{
    width:18px;
    height:18px;
    accent-color:var(--yellow);
}
.remember-row span{
    color:var(--muted);
    font-weight:800;
}
.search-panel{padding:16px}
.search-panel input{font-size:16px}
.toast-stack{
    position:fixed;
    top:18px;
    right:18px;
    z-index:1000;
    width:min(370px,calc(100vw - 36px));
    display:grid;
    gap:10px;
}
.toast{
    background:#191919;
    border:1px solid var(--yellow);
    border-left:5px solid var(--yellow);
    border-radius:8px;
    box-shadow:0 14px 36px rgba(0,0,0,.45);
    color:var(--text);
    padding:15px 18px;
    font-weight:800;
    animation:toast-in .22s ease-out;
    cursor:pointer;
}
@keyframes toast-in{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}
.confirm-backdrop{
    position:fixed;
    inset:0;
    z-index:2000;
    display:grid;
    place-items:center;
    padding:20px;
    background:rgba(0,0,0,.76);
    backdrop-filter:blur(4px);
}
.confirm-dialog{
    width:min(430px,100%);
    background:#151515;
    border:1px solid #3a3a3a;
    border-top:4px solid var(--yellow);
    border-radius:8px;
    box-shadow:0 24px 70px rgba(0,0,0,.65);
    padding:26px;
    text-align:center;
}
.confirm-icon{
    display:grid;
    place-items:center;
    width:48px;
    height:48px;
    margin:0 auto 14px;
    border-radius:50%;
    background:rgba(250,204,21,.16);
    border:1px solid var(--yellow);
    color:var(--yellow);
    font-size:26px;
    font-weight:900;
}
.confirm-dialog h2{color:var(--text);margin-bottom:10px}
.confirm-dialog p{color:var(--muted);line-height:1.5}
.confirm-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:22px}
.confirm-actions button{width:100%}
.detail-tabs{
    display:flex;
    gap:6px;
    overflow-x:auto;
    margin:0 0 20px;
    padding-bottom:6px;
    scrollbar-width:thin;
}
.detail-tabs button{
    flex:0 0 auto;
    border:1px solid var(--line);
    border-radius:8px;
    background:#171717;
    color:var(--text);
    padding:11px 15px;
    font-weight:800;
    cursor:pointer;
}
.detail-tabs button.active{background:var(--yellow);color:#080808;border-color:var(--yellow)}
.tab-panel{min-width:0}
.recent-plates{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.recent-plates a{background:#1b1b1b;border:1px solid var(--line);border-radius:8px;padding:14px;color:var(--yellow);font-weight:900;text-decoration:none}
.recent-plates small{display:block;color:var(--muted);font-weight:600;margin-top:5px}
.recent-plates a:hover{border-color:var(--yellow)}
.plate-select-search{margin-bottom:7px}
.list-row[href]{text-decoration:none}
.list-row[href]:hover strong{color:var(--yellow)}
.dashboard-jump label{display:block;margin-bottom:10px}
@media(max-width:1050px){
    body{display:block}
    .sidebar{position:relative;width:100%;min-height:auto}
    .sidebar-user{position:static;margin-top:18px}
    .content{margin-left:0;width:100%;padding:20px}
    .metric-grid,.grid-2,.record-grid,.form-grid,.document-status-grid{grid-template-columns:1fr}
    .page-head,.header-actions,.search-form,.compact-form,.status-form{flex-direction:column}
    .bulk-form{flex-direction:column;align-items:stretch}
    .quick-actions{grid-template-columns:1fr}
    .recent-plates{grid-template-columns:repeat(2,minmax(0,1fr))}
    .primary-btn,.secondary-btn,.search-form button{width:100%;text-align:center}
}
@media(max-width:640px){
    .content{padding:14px}
    .sidebar{padding:14px;max-height:none}
    .brand{margin-bottom:12px}
    .nav{flex-direction:row;overflow-x:auto;overflow-y:hidden;padding-bottom:8px}
    .nav a{flex:0 0 auto;padding:10px 12px}
    .sidebar-user{display:flex;align-items:center;gap:10px;margin-top:8px;padding-top:10px}
    .sidebar-user a{margin:0 0 0 auto;width:auto}
    h1{font-size:27px}
    .panel{padding:16px}
    .metric-grid{grid-template-columns:1fr 1fr}
    .metric span{font-size:30px}
    .recent-plates,.confirm-actions{grid-template-columns:1fr}
    .list-row,.timeline-row{flex-direction:column;gap:6px}
}
