
  :root {
    --red: #cc0000;
    --red-dark: #990000;
    --red-light: #ff2222;
    --cream: #fdf8f5;
    --white: #ffffff;
    --gray-50: #f9f9f9;
    --gray-100: #f0f0f0;
    --gray-200: #e0e0e0;
    --gray-400: #999;
    --gray-600: #555;
    --gray-800: #222;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.16);
    --radius: 12px;
    --radius-sm: 8px;
  }

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

  body {
    font-family: var(--font-body);
    background: var(--cream);
    color: var(--gray-800);
    min-height: 100vh;
  }

  /* ─── LOGIN SCREEN ─── */
  #login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--bar-1) 0%, var(--bar-2) 40%, #700000 100%);
    position: relative;
    overflow: hidden;
  }

  #login-screen::before {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(204,0,0,0.15) 0%, transparent 70%);
    top: -100px; right: -100px;
    animation: pulse 4s ease-in-out infinite;
  }

  #login-screen::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(204,0,0,0.1) 0%, transparent 70%);
    bottom: -50px; left: -50px;
    animation: pulse 4s ease-in-out infinite 2s;
  }

  @keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
  }

  .login-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 50px 60px;
    width: 460px;
    position: relative;
    z-index: 10;
    box-shadow: 0 20px 80px rgba(0,0,0,0.5);
    animation: fadeUp 0.6s ease both;
  }

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




  .login-title {
    text-align: center;
    margin-bottom: 35px;
  }

  .login-title .main-title {
    font-family: var(--font-head);
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
    line-height: 1.3;
    margin-bottom: 6px;
  }

  .login-title .sub-title {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    letter-spacing: 2px;
    text-transform: uppercase;
  }

  .divider {
    width: 60px; height: 2px;
    background: var(--red);
    margin: 15px auto;
    border-radius: 2px;
  }

  .form-group {
    margin-bottom: 18px;
  }

  .form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px;
  }

  .form-group input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 15px;
    transition: all 0.3s;
    outline: none;
  }

  .form-group input:focus {
    border-color: var(--red);
    background: rgba(204,0,0,0.08);
    box-shadow: 0 0 0 3px rgba(204,0,0,0.15);
  }

  .form-group input::placeholder { color: rgba(255,255,255,0.25); }

  .login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
    text-transform: uppercase;
  }

  .login-btn:hover {
    background: linear-gradient(135deg, var(--red-light), var(--red));
    box-shadow: 0 6px 25px rgba(204,0,0,0.4);
    transform: translateY(-1px);
  }

  .login-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 11px;
    color: rgba(255,255,255,0.3);
  }

  /* ─── MAIN APP ─── */
  #app { display: none; min-height: 100vh; }

  /* ─── TOP BAR ─── */
  .topbar {
    background: linear-gradient(135deg, var(--bar-1), var(--bar-2));
    color: white;
    padding: 0 30px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
  }

  .topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .topbar-logo {
    width: 36px; height: 36px;
    background: var(--red);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
  }

  .topbar-name {
    font-size: 15px;
    font-weight: 600;
    color: white;
  }

  .topbar-subtitle {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    letter-spacing: 1px;
  }

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

  .topbar-datetime {
    text-align: right;
    font-size: 13px;
    color: rgba(255,255,255,0.7);
  }

  .topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    background: rgba(255,255,255,0.08);
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.2s;
  }

  .topbar-user:hover { background: rgba(255,255,255,0.14); }

  .user-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--red);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    font-weight: 700;
  }

  .user-name { font-size: 13px; color: white; font-weight: 500; }



  /* ─── LAYOUT ─── */
  .layout {
    display: flex;
    margin-top: 64px;
    min-height: calc(100vh - 64px);
  }

  /* ─── SIDEBAR ─── */
  .sidebar {
    width: 270px;
    background: white;
    border-right: 1px solid var(--gray-200);
    flex-shrink: 0;
    overflow-y: auto;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    box-shadow: 2px 0 12px rgba(0,0,0,0.05);
  }

  .sidebar-section {
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
  }

  .sidebar-section:last-child { border-bottom: none; }

  .sidebar-section-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gray-400);
    padding: 12px 20px 6px;
  }

  .sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    font-size: 14px;
    color: var(--gray-600);
    font-weight: 500;
  }

  .sidebar-item:hover {
    background: #fff5f5;
    color: var(--red);
    border-left-color: rgba(204,0,0,0.3);
  }

  .sidebar-item.active {
    background: linear-gradient(90deg, #fff0f0, #fff8f8);
    color: var(--red);
    border-left-color: var(--red);
    font-weight: 600;
  }

  .sidebar-icon {
    width: 34px; height: 34px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
    background: var(--gray-100);
    flex-shrink: 0;
    transition: all 0.2s;
  }

  .sidebar-item.active .sidebar-icon,
  .sidebar-item:hover .sidebar-icon {
    background: rgba(204,0,0,0.1);
  }

  /* ─── MAIN CONTENT ─── */
  .main {
    flex: 1;
    padding: 30px;
    overflow-x: hidden;
  }

  /* ─── PAGE HEADER ─── */
  .page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--gray-100);
  }

  .page-title {
    font-family: var(--font-head);
    font-size: 26px;
    font-weight: 700;
    color: var(--gray-800);
  }


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

  .btn-primary {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: white;
    box-shadow: 0 4px 14px rgba(204,0,0,0.3);
  }

  .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(204,0,0,0.4);
  }

  .btn-outline {
    background: white;
    color: var(--red);
    border: 1.5px solid var(--red);
  }

  .btn-outline:hover {
    background: rgba(204,0,0,0.05);
  }

  .btn-ghost {
    background: var(--gray-100);
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
  }

  .btn-ghost:hover { background: var(--gray-200); }

  /* ─── CARDS ─── */
  .card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
  }

  .card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .card-title-icon {
    width: 32px; height: 32px;
    background: rgba(204,0,0,0.1);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
  }

  /* ─── STAT CARDS ─── */
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
  }

  .stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    position: relative;
    overflow: hidden;
  }

  .stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--red), var(--red-light));
  }

  .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1;
    margin-bottom: 6px;
  }

  .stat-label {
    font-size: 13px;
    color: var(--gray-400);
    font-weight: 500;
  }

  .stat-icon {
    position: absolute;
    bottom: 16px; right: 16px;
    font-size: 36px;
    opacity: 0.08;
  }

  /* ─── FORM INPUTS ─── */
  .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
  }

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

  .field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    letter-spacing: 0.5px;
    text-transform: uppercase;
  }

  .field input, .field select, .field textarea {
    padding: 11px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--gray-800);
    background: white;
    transition: all 0.2s;
    outline: none;
  }

  .field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(204,0,0,0.08);
  }

  .field textarea { resize: vertical; min-height: 80px; }

  /* ─── TABLE ─── */
  .table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
  }

  table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
  }

  thead {
    background: linear-gradient(135deg, var(--bar-1), var(--bar-2));
    color: white;
  }

  thead th {
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
  }

  tbody tr {
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.15s;
  }

  tbody tr:hover { background: #fff5f5; }
  tbody tr:last-child { border-bottom: none; }

  tbody td {
    padding: 12px 16px;
    color: var(--gray-600);
  }

  tbody td:first-child { color: var(--gray-800); font-weight: 500; }

  .badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
  }

  .badge-green { background: var(--ok-bg); color: var(--ok); }
  .badge-red { background: #ffe6e6; color: var(--red-dark); }
  .badge-blue { background: var(--info-bg); color: var(--info); }
  .badge-yellow { background: var(--warn-bg); color: var(--warn); }






  /* ─── PANELS ─── */
  .page { display: none; }
  .page.active { display: block; animation: pageIn 0.3s ease; }

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

  /* ─── DASHBOARD GRID ─── */
  .dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-top: 4px;
  }

  .quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
  }

  .quick-action-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1.5px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-sm);
  }

  .quick-action-card:hover {
    border-color: var(--red);
    box-shadow: 0 4px 20px rgba(204,0,0,0.12);
    transform: translateY(-2px);
  }

  .qa-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(204,0,0,0.1), rgba(204,0,0,0.05));
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
  }

  .qa-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.3;
  }


  /* ─── PHOTO UPLOAD ─── */
  .photo-upload {
    width: 120px; height: 140px;
    border: 2px dashed var(--gray-200);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--gray-50);
    font-size: 12px;
    color: var(--gray-400);
    text-align: center;
    gap: 8px;
  }

  .photo-upload:hover {
    border-color: var(--red);
    background: rgba(204,0,0,0.03);
    color: var(--red);
  }

  /* ─── NOTICE ─── */
  .notice {
    background: linear-gradient(90deg, rgba(204,0,0,0.05), transparent);
    border-left: 4px solid var(--red);
    padding: 14px 18px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 13px;
    color: var(--gray-600);
    margin-top: 16px;
  }

  .notice strong { color: var(--red-dark); }

  /* ─── FATURA ─── */
  .fatura-box {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 30px;
  }

  .fatura-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--gray-100);
    margin-bottom: 24px;
  }

  .fatura-title {
    font-family: var(--font-head);
    font-size: 22px;
    font-weight: 700;
    color: var(--red-dark);
  }

  .fatura-no {
    text-align: right;
    font-size: 14px;
    color: var(--gray-600);
  }

  /* ─── CHECKBOX ENGEL ─── */
  .engel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .engel-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
  }

  .engel-item input[type=checkbox] { accent-color: var(--red); width: 16px; height: 16px; }
  .engel-item:hover { border-color: var(--red); background: rgba(204,0,0,0.03); }

  /* ─── MODAL ─── */
  .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
  }

  .modal-overlay.open { display: flex; }

  .modal {
    background: white;
    border-radius: 16px;
    padding: 32px;
    width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 80px rgba(0,0,0,0.3);
    animation: modalIn 0.25s ease;
  }

  @keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
  }

  .modal-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .modal-title span { color: var(--red); }

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

  /* ─── TOAST ─── */
  .toast {
    position: fixed;
    bottom: 30px; right: 30px;
    background: var(--bar-1);
    color: white;
    padding: 14px 22px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(120%);
    transition: transform 0.3s ease;
  }

  .toast.show { transform: translateX(0); }
  .toast .t-icon { font-size: 18px; }










  /* ─── HARÇLIK ─── */
  .balance-display {
    background: linear-gradient(135deg, var(--bar-1), var(--bar-2));
    color: white;
    border-radius: var(--radius);
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
  }

  .balance-amount {
    font-size: 36px;
    font-weight: 700;
    font-family: var(--font-head);
  }

  .balance-label { font-size: 13px; color: rgba(255,255,255,0.6); margin-bottom: 4px; }

  /* ─── Scrollbar ─── */
  ::-webkit-scrollbar { width: 6px; height: 6px; }
  ::-webkit-scrollbar-track { background: var(--gray-100); }
  ::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 10px; }
  ::-webkit-scrollbar-thumb:hover { background: var(--red); }

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

  @media (max-width: 768px) {
    .sidebar { display: none; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .quick-actions { grid-template-columns: 1fr; }
  }

/* ═══ MARKA KANONU (BRAND.md) — yazı tipleri yerelden, renkler tek yerden ═══ */
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/noto-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/noto-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 700 800; font-display: swap; src: url(/fonts/playfair-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 700 800; font-display: swap; src: url(/fonts/playfair-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --font-body: 'Noto Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Playfair Display', Georgia, serif;
  --red: #cc0000; --red-dark: #990000; --bar-1: #1a0000; --bar-2: #3d0000;
  --red-bg: #fff3f3; --red-line: #f3caca;
  --ok: #1a7a4a; --ok-bg: #eef8f2; --ok-line: #cfe9db;
  --warn: #996600; --warn-strong: #cc8a00; --warn-bg: #fff8e6;
  --info: #1a4a99; --info-bg: #e6f0ff;
  --cream: #fdf8f5; --readonly-bg: #faf7f5;
}
body { font-family: var(--font-body); }
button, input, select, textarea, optgroup { font-family: inherit; }

/* ─── Faz 1 eklemeleri ─── */
.login-error { font-size: 13px; color: #ffb3b3; margin: 0 0 10px; }
.login-error:empty { display: none; }
.login-error.dark { color: var(--red-dark); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }
.role-chip { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 2px 8px; border-radius: 50px; background: rgba(255,255,255,0.14); color: rgba(255,255,255,0.8); }
.soon { margin-left: auto; font-size: 10px; font-weight: 700; letter-spacing: 1px; padding: 2px 7px; border-radius: 50px; background: var(--gray-100); color: var(--gray-400); text-transform: uppercase; }
.empty { text-align: center; color: var(--gray-400); font-size: 13px; padding: 14px; }
td.empty, .empty { font-weight: 400 !important; }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }
.seg { display: inline-flex; border: 1.5px solid var(--gray-200); border-radius: 50px; overflow: hidden; }
.seg button { background: white; border: none; padding: 6px 14px; font: 600 12px var(--font-body); color: var(--gray-600); cursor: pointer; }
.seg button.active { background: var(--red); color: white; }
.mini-input { padding: 8px 14px; border: 1.5px solid var(--gray-200); border-radius: 50px; font: 13px var(--font-body); outline: none; min-width: 190px; }
.mini-input:focus { border-color: var(--red); }
.sub-title2 { font-size: 13px; font-weight: 700; color: var(--gray-600); margin: 22px 0 10px; text-transform: uppercase; letter-spacing: 1px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
tbody tr.clickable { cursor: pointer; }
tbody tr.selected { background: var(--red-bg); }
.photo-upload { overflow: hidden; padding: 0; }
.photo-upload img { width: 100%; height: 100%; object-fit: cover; }
.mock-notice { margin: 0 0 18px; }
.mock-page input, .mock-page select, .mock-page textarea { background: var(--gray-50); }
[data-role].role-hidden, .role-hidden { display: none !important; }
.field input[readonly] { background: var(--gray-50); color: var(--gray-600); }
#print-area { display: none; }
.print-sheet { font-family: var(--font-body); color: #000; padding: 20px; }
.print-sheet h1 { font-size: 20px; margin-bottom: 4px; }
.print-sheet h2 { font-size: 13px; margin: 18px 0 6px; border-bottom: 1px solid #000; padding-bottom: 3px; text-transform: uppercase; }
.print-sheet table { width: 100%; border-collapse: collapse; font-size: 12px; }
.print-sheet td, .print-sheet th { border: 1px solid var(--gray-400); padding: 6px 8px; text-align: left; }
.print-sheet .kv td:first-child { width: 32%; font-weight: 700; background: var(--gray-100); }
.print-sheet .sign { display: flex; gap: 30px; margin-top: 50px; font-size: 12px; text-align: center; }
.print-sheet .sign div { flex: 1; border-top: 1px solid #000; padding-top: 4px; }
@media print {
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; }
}
@media (max-width: 768px) {
  .main { padding: 16px; }
  .login-card { width: 92vw; padding: 36px 24px; }
}
/* mobil: menü ☰ ile açılan yan çekmece */
.nav-toggle, .nav-backdrop { display: none; }
@media (max-width: 768px) {
  .layout { flex-direction: column; }
  .nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 4px; width: 40px; height: 40px; padding: 0 9px; margin-right: 2px; border: 0; border-radius: 10px; background: rgba(255,255,255,0.08); cursor: pointer; flex-shrink: 0; }
  .nav-toggle span { display: block; height: 2px; border-radius: 2px; background: #fff; transition: transform .2s, opacity .2s; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .sidebar { display: block !important; position: fixed; top: 64px; left: 0; bottom: 0; width: min(290px, 84vw); height: auto; z-index: 900; transform: translateX(-102%); transition: transform .25s ease; box-shadow: 8px 0 30px rgba(0,0,0,0.2); overflow-y: auto; -webkit-overflow-scrolling: touch; }
  body.nav-open .sidebar { transform: none; }
  .nav-backdrop { display: block; position: fixed; inset: 64px 0 0 0; z-index: 899; background: rgba(20,0,0,0.45); opacity: 0; pointer-events: none; transition: opacity .25s; }
  body.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
  .sidebar-item { padding: 13px 20px; font-size: 15px; }
  .topbar { padding: 0 12px; }
  .topbar-left { gap: 10px; min-width: 0; }
  .topbar-datetime, .topbar-subtitle { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ─── Hasta kabul v2 ─── */
.req { color: var(--red); }
.hint { font-size: 11px; color: var(--gray-400); min-height: 14px; }
.hint.ok { color: var(--ok); } .hint.bad { color: var(--red); }
.field input.valid { border-color: var(--ok); }
.field input.invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(204,0,0,0.08); }
.list-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.seg { flex-wrap: wrap; }
.seg button b { font-weight: 700; opacity: .7; margin-left: 4px; }
.seg button b:empty { display: none; }
table.sortable th[data-sort] { cursor: pointer; user-select: none; }
table.sortable th[data-sort]::after { content: ' ↕'; opacity: .35; }
table.sortable th.asc::after { content: ' ↑'; opacity: 1; }
table.sortable th.desc::after { content: ' ↓'; opacity: 1; }
tbody tr.clickable:focus { outline: 2px solid var(--red); outline-offset: -2px; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 12px; font-size: 13px; color: var(--gray-600); }
.form-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.status-pill { display: inline-block; padding: 6px 16px; border-radius: 50px; font-size: 14px; font-weight: 700; }
.patient-top { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.photo-col { display: flex; flex-direction: column; gap: 6px; }
.photo-upload { position: relative; }
.photo-change { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; padding: 4px; text-align: center; opacity: 0; transition: opacity .2s; }
.photo-upload:hover .photo-change { opacity: 1; }
.com-line { font-size: 14px; color: var(--gray-600); margin-bottom: 12px; }
.com-line a { color: var(--red); font-weight: 600; margin-left: 6px; }
.com-line .warn { color: var(--warn); font-weight: 600; }
.decision-hint { background: var(--warn-bg); color: var(--warn); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; margin-bottom: 12px; }
.decision-hint[hidden] { display: none; }
.decision-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.decision-row .sep { width: 1px; height: 28px; background: var(--gray-200); margin: 0 6px; }
.durum-label { font-size: 13px; font-weight: 600; color: var(--gray-600); }
.btn.current { background: var(--red); color: #fff; border-color: var(--red); opacity: 1 !important; }
.timeline { list-style: none; border-left: 2px solid var(--gray-200); margin-left: 6px; padding-left: 18px; }
.timeline li { position: relative; padding: 6px 0 10px; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
.timeline li::before { content: ''; position: absolute; left: -25px; top: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--gray-400); border: 2px solid #fff; }
.timeline li.tl-kabul::before, .timeline li.tl-aktif::before { background: var(--ok); }
.timeline li.tl-red::before { background: var(--red); }
.timeline li.tl-izinli::before { background: var(--info); }
.timeline li.empty { color: var(--gray-400); }
.timeline li.empty::before { display: none; }
.tl-when { color: var(--gray-400); min-width: 120px; }
.tl-what { font-weight: 600; color: var(--gray-800); }
.tl-who { color: var(--gray-600); }
.tl-com { flex-basis: 100%; font-size: 12px; color: var(--gray-400); }
.save-bar { position: sticky; bottom: 0; z-index: 50; margin: 20px -30px -30px; padding: 14px 30px; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-top: 1px solid var(--gray-200); display: flex; justify-content: flex-end; align-items: center; gap: 10px; box-shadow: 0 -4px 16px rgba(0,0,0,.05); }
.dirty-note { margin-right: auto; font-size: 13px; font-weight: 600; color: var(--warn); opacity: 0; transition: opacity .2s; }
.dirty-note.show { opacity: 1; }
.dirty-note::before { content: '● '; }
@media (max-width: 768px) {
  .save-bar { margin: 16px -12px -24px; padding: 12px; }
  .save-bar .btn { flex: 1; justify-content: center; }
  .dirty-note { flex-basis: 100%; }
  .decision-row .sep { display: none; }
  .list-toolbar .mini-input { width: 100%; }
  .photo-col { margin: 0 auto; }
  .pager { justify-content: center; }
  .page-header { flex-wrap: wrap; gap: 12px; }
}
@media (max-width: 768px) {
  .topbar-right { gap: 8px; }
  .topbar-user { padding: 4px; }
  .topbar-user .user-name, .topbar-user .role-chip { display: none; }
  .topbar-name { font-size: 13px; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .seg { border-radius: 12px; }
}
.decided-com { background: var(--ok-bg); border: 1px solid var(--ok-line); border-left: 4px solid var(--ok); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 10px; color: var(--gray-800); }
.decided-com .dc-head { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--ok); margin-bottom: 4px; }
.cur-com.muted { font-size: 12px; color: var(--gray-400); }
.decided-com.red { background: var(--red-bg); border-color: var(--red-line); border-left-color: var(--red); }
.decided-com.red .dc-head { color: var(--red-dark); }

/* ─── Rapor PDF ─── */
.pdf-drop { display: flex; align-items: center; gap: 18px; padding: 22px 26px; border: 2px dashed var(--red-line); border-radius: var(--radius); background: linear-gradient(90deg, var(--red-bg), #fff); cursor: pointer; transition: all .2s; }
.pdf-drop:hover, .pdf-drop.over { border-color: var(--red); background: var(--red-bg); }
.pdf-drop-icon { font-size: 36px; }
.pdf-drop-title { font-weight: 700; color: var(--gray-800); font-size: 15px; }
.pdf-drop-sub { font-size: 12px; color: var(--gray-400); margin-top: 3px; }
.pdf-result { margin-top: 14px; background: #fff; border: 1px solid var(--gray-200); border-left: 4px solid var(--ok); border-radius: var(--radius-sm); padding: 14px 18px; font-size: 13px; }
.pdf-result.warn { border-left-color: var(--warn-strong); background: var(--warn-bg); }
.pdf-result[hidden] { display: none; }
.pr-head { font-size: 14px; margin-bottom: 10px; }
.pr-grid { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 4px 14px; margin-bottom: 10px; }
.pr-grid span { color: var(--gray-400); }
.pr-ok { color: var(--ok); margin: 6px 0; }
.pr-warn { color: var(--warn); margin: 6px 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pr-warn[hidden] { display: none; }
.pr-notes { margin: 8px 0 0 18px; color: var(--gray-600); font-size: 12px; }
.engel-item.suggested { border-color: var(--warn-strong); background: var(--warn-bg); }
.engel-item.suggested::after { content: 'öneri'; margin-left: auto; font-size: 10px; font-weight: 700; color: var(--warn-strong); text-transform: uppercase; }
@media (max-width: 768px) { .pr-grid { grid-template-columns: auto 1fr; } .engel-grid { grid-template-columns: 1fr 1fr; } }

/* ─── Rapor kayıt v2 ─── */
td .sub { font-size: 11px; color: var(--gray-400); }
.rp-patient-top { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.rp-photo { width: 90px; height: 110px; border-radius: var(--radius-sm); background: var(--gray-50); border: 1.5px solid var(--gray-200); display: flex; align-items: center; justify-content: center; font-size: 34px; overflow: hidden; flex-shrink: 0; }
.rp-photo img { width: 100%; height: 100%; object-fit: cover; }
.validity { margin-top: 6px; font-size: 13px; color: var(--gray-600); }
.pr-flex { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.pr-photo { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 150px; font-size: 12px; cursor: pointer; text-align: center; }
.pr-photo img { width: 120px; height: auto; border-radius: 6px; border: 1px solid var(--gray-200); }
.pr-photo small { color: var(--gray-400); display: block; }
#rp-doc-actions { display: inline-flex; gap: 8px; }
td.row-actions { text-align: right; width: 1%; white-space: nowrap; }
.del-btn:hover { background: var(--red-bg); color: var(--red-dark); border-color: var(--red-line); }
.crop-frame { position: relative; width: 240px; height: 320px; margin: 0 auto; overflow: hidden; border-radius: 10px; background: var(--gray-800); cursor: grab; touch-action: none; box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); }
.crop-frame:active { cursor: grabbing; }
.crop-frame img { position: absolute; max-width: none; user-select: none; pointer-events: none; }
.photo-col .btn-sm { justify-content: center; }
.photo-upload { height: 160px !important; }
.rp-photo { height: 120px; }

/* düzenlenebilir rapor tabloları */
.edit-hint { font-size: 11px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--gray-400); margin-left: 6px; }
.edit-table td { padding: 4px 6px; vertical-align: top; }
.edit-table .cell-in { width: 100%; border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 6px 8px; font: inherit; font-size: 13px; color: inherit; resize: vertical; }
.edit-table textarea.cell-in { font-size: 12px; line-height: 1.45; min-height: 38px; }
.edit-table .cell-in:hover { border-color: var(--gray-200); background: #fff; }
.edit-table .cell-in:focus { outline: none; border-color: var(--red); background: #fff; box-shadow: 0 0 0 3px rgba(204,0,0,.10); }
.edit-table .cell-del { border: 0; background: transparent; color: var(--gray-400); cursor: pointer; font-size: 14px; padding: 6px 8px; border-radius: 6px; }
.edit-table .cell-del:hover { color: var(--red); background: var(--red-bg); }
.edit-table .cell-empty { color: var(--gray-400); font-size: 13px; padding: 12px; text-align: center; }
.edit-add { margin-top: 8px; }

/* Rapor Kayıt: e-Rapor sırası */
.rp-order-note { margin: 16px 0 4px; font-size: 12px; color: var(--gray-600); }
.rp-sec { margin-top: 16px; }
.rp-sec .card-title-icon { font-weight: 700; font-size: 14px; }
.rp-internal { border-style: dashed; background: var(--gray-50); }
.sec-hint { font-weight: 400; color: var(--gray-400); font-size: 11px; margin-left: 4px; }
.ro-note { font-size: 12px; color: var(--gray-400); margin: -4px 0 10px; }
.field input.ro-mismatch { border-color: var(--red); color: var(--red); background: var(--red-bg); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#rp-engel { grid-template-columns: 1fr 1fr; }
.pr-bad { color: var(--red-dark); background: var(--red-bg); border: 1px solid var(--red-line); border-radius: 8px; padding: 8px 10px; margin: 6px 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pdf-result.dup { border-color: var(--red-line); }

/* Sağ üst kullanıcı menüsü */
.user-menu-wrap { position: relative; }
button.topbar-user { border: 0; font: inherit; color: inherit; }
.topbar-user:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.user-caret { color: rgba(255,255,255,.7); font-size: 11px; }
.user-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: #fff; color: var(--gray-800); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: 6px; z-index: 1000; }
.user-menu[hidden] { display: none; }
.um-head { padding: 10px 12px 8px; border-bottom: 1px solid var(--gray-200); margin-bottom: 4px; display: flex; flex-direction: column; gap: 2px; }
.um-head span { font-size: 12px; color: var(--gray-400); }
.user-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: 8px; font: inherit; font-size: 13px; color: var(--gray-800); cursor: pointer; }
.user-menu button:hover, .user-menu button:focus-visible { background: var(--gray-100); outline: none; }
.user-menu .um-danger { color: var(--red); }
.um-sep { height: 1px; background: var(--gray-200); margin: 4px 0; }
.acc-info { display: grid; gap: 8px; background: var(--gray-50); border-radius: 10px; padding: 12px 14px; }
.acc-info div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.acc-info span { color: var(--gray-400); }
.si-long { display: grid; gap: 14px; }
.si-long textarea { min-height: 70px; resize: vertical; line-height: 1.5; }
.muted-sm { font-size: 12px; color: var(--gray-400); }

/* kurum logosu */
.topbar-logo.has-logo { background: #fff; border-radius: 8px; width: auto; min-width: 36px; max-width: 120px; height: 40px; padding: 3px; }
.topbar-logo.has-logo img { display: block; height: 100%; width: auto; max-width: 114px; object-fit: contain; }
.logo-field { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.logo-preview { width: 140px; height: 80px; border: 1px dashed var(--gray-200); border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--gray-400); font-size: 12px; flex-shrink: 0; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-actions { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 200px; }
.logo-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.logo-hint { font-size: 12px; color: var(--gray-600); line-height: 1.4; }

/* personel = salt okunur */
.ro-notice { margin: 0 0 16px; }
body.readonly .page input:not([type=search]), body.readonly .page select, body.readonly .page textarea { background: var(--readonly-bg); }
body.readonly .page input:not([type=search]):focus, body.readonly .page textarea:focus { box-shadow: none; border-color: var(--gray-200); }
body.readonly .page select:disabled, body.readonly .page input:disabled { opacity: 1; color: inherit; -webkit-text-fill-color: currentColor; }
.page textarea, .page .edit-table textarea.cell-in { overflow-y: hidden; resize: none; }
body.readonly .page input[type=checkbox], body.readonly .page input[type=radio] { opacity: .75; }
body.readonly #p-foto-box { pointer-events: none; }
body.readonly .cell-del { display: none; }

/* mobil: tablolar kart görünümünde (etiketler data-label ile JS'ten) */
.dashboard-grid > *, .grid-2 > * { min-width: 0; }
@media (max-width: 768px) {
  .main { padding: 14px 12px 24px; }
  .card { padding: 18px 14px; }
  .page-title { font-size: 24px; }
  .page .table-wrapper { overflow: visible; border: 0; box-shadow: none; background: transparent; }
  .page table.m-cards, .page table.m-cards tbody, .page table.m-cards tr, .page table.m-cards td { display: block; width: 100% !important; }
  .page table.m-cards thead { display: none; }
  .page table.m-cards tr { background: #fff; border: 1px solid var(--gray-200); border-radius: 14px; padding: 10px 14px; margin-bottom: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
  .page table.m-cards tr:hover { background: #fff; }
  .page table.m-cards td { border: 0 !important; padding: 5px 0 !important; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: right !important; min-height: 28px; font-size: 14px; }
  .page table.m-cards td::before { content: attr(data-label); flex-shrink: 0; text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gray-400); }
  .page table.m-cards td[data-label=""]::before { display: none; }
  .page table.m-cards td[data-label=""] { justify-content: flex-end; }
  .page table.m-cards td:first-child { justify-content: flex-start; text-align: left !important; font-size: 16px; font-weight: 700; padding-bottom: 8px !important; border-bottom: 1px solid var(--gray-100) !important; margin-bottom: 4px; }
  .page table.m-cards td:first-child::before { display: none; }
  .page table.m-cards td[colspan] { justify-content: center; text-align: center !important; }
  .page table.m-cards td[colspan]::before { display: none; }
  /* düzenlenebilir tablolar: alan tam genişlik, etiket üstte */
  .page table.edit-table.m-cards tr { position: relative; padding: 8px 12px 10px; }
  .page table.edit-table.m-cards td { flex-direction: column; align-items: stretch; gap: 3px; text-align: left !important; padding: 4px 0 !important; min-height: 0; }
  .page table.edit-table.m-cards td:first-child { font-size: 14px; font-weight: 400; border-bottom: 0 !important; margin-bottom: 0; padding-right: 36px !important; }
  .page table.edit-table.m-cards td:first-child::before { display: block; }
  .page table.edit-table.m-cards td::before { font-size: 10px; }
  .page table.edit-table.m-cards .cell-in { width: 100% !important; border-color: var(--gray-200); background: #fff; font-size: 16px; padding: 7px 10px; }
  .page table.edit-table.m-cards textarea.cell-in { min-height: 44px; font-size: 15px; }
  .page table.edit-table.m-cards td[data-label=""] { position: absolute; top: 4px; right: 4px; width: auto !important; padding: 0 !important; }
  .page table.edit-table.m-cards td[data-label=""]:first-child { position: static; }
  .form-row { grid-template-columns: 1fr !important; gap: 12px; }
  .form-row .field { width: 100%; min-width: 0; }
  .field input, .field select, .field textarea { font-size: 16px; } /* iOS'ta odakta yakınlaştırmayı önler */
  .pdf-drop { padding: 16px; gap: 12px; }
  .quick-actions { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .page [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  .page .card, .page [style*="display:grid"] > *, .page [style*="display: grid"] > * { min-width: 0; max-width: 100%; }
  .page [style*="display:flex"], .page [style*="display: flex"] { flex-wrap: wrap; }
}

/* ─── Sol menü (reklamdaki sade düzen): düz ikon, büyük yazı, seçili = kırmızı + sol çizgi ─── */
.sidebar { width: 240px; box-shadow: none; }
.sidebar-section { padding: 6px 0; border-bottom: 1px solid var(--gray-100); }
.sidebar-section-title { font-size: 10px; letter-spacing: .14em; padding: 12px 22px 4px; color: var(--gray-400); }
.sidebar-item { gap: 12px; padding: 11px 20px; font-size: 15px; font-weight: 500; color: #444; border-left: 4px solid transparent; }
.sidebar-item:hover { background: var(--red-bg); color: var(--red); border-left-color: transparent; }
.sidebar-item.active { background: rgba(204,0,0,0.07); color: var(--red); font-weight: 700; border-left-color: var(--red); }
.sidebar-icon, .sidebar-item.active .sidebar-icon, .sidebar-item:hover .sidebar-icon { width: 22px; height: auto; background: none; font-size: 18px; border-radius: 0; }
.sidebar-item { white-space: nowrap; }
.sidebar-item .soon { font-size: 9.5px; padding: 2px 7px; white-space: nowrap; flex-shrink: 0; }

/* ─── Gezinme düğmesi (tek bileşen): Listeye dön / … aç ─── */
.nav-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border: 1.5px solid var(--gray-200); border-radius: 50px; background: #fff;
  color: var(--gray-800); font: 600 13px/1 var(--font-body); cursor: pointer; white-space: nowrap; vertical-align: middle; transition: border-color .15s, color .15s, background .15s, box-shadow .15s; }
.nav-btn:hover { border-color: var(--red); color: var(--red); background: var(--red-bg); }
.nav-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(204,0,0,.18); border-color: var(--red); }
.nav-btn::before, .nav-btn::after { content: ''; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; flex-shrink: 0; }
.nav-btn.nav-back::before { transform: rotate(135deg); margin-left: 3px; }
.nav-btn.nav-back::after { display: none; }
.nav-btn.nav-go::before { display: none; }
.nav-btn.nav-go::after { transform: rotate(-45deg); margin-right: 3px; }
.nav-btn[hidden] { display: none; }
.hint .nav-btn, .pr-bad .nav-btn, .ro-note .nav-btn { height: 28px; padding: 0 12px; font-size: 12px; margin-left: 4px; }
/* Sayı kutuları her zaman sola yaslı (BRAND.md) */
input[type=number], input[inputmode=numeric], input[inputmode=decimal] { text-align: left !important; }

/* ─── Giriş ekranı ─── */
#login-screen { padding: 24px 16px; overflow-y: auto; }
.login-card { width: 440px; max-width: 100%; padding: 44px 44px 32px; }
.login-brand { display: flex; justify-content: center; margin-bottom: 22px; }
.login-mark { width: 76px; height: 76px; border-radius: 20px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14);
  display: flex; align-items: center; justify-content: center; font-size: 36px; overflow: hidden; }
.login-mark.has-logo { background: #fff; width: auto; min-width: 76px; max-width: 220px; padding: 8px 12px; }
.login-mark.has-logo img { height: 100%; width: auto; max-width: 196px; object-fit: contain; }
.login-title { margin-bottom: 28px; }
.login-title .main-title { font-size: 24px; }
.login-title .sub-title { letter-spacing: .14em; color: rgba(255,255,255,0.65); }
.form-group label { color: rgba(255,255,255,0.78); }
.form-group input::placeholder { color: rgba(255,255,255,0.38); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 84px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); height: 32px; padding: 0 12px; border: 0; border-radius: 8px;
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.85); font: 600 12px var(--font-body); cursor: pointer; }
.pw-toggle:hover { background: rgba(255,255,255,0.18); }
.caps-hint { margin-top: 6px; font-size: 12px; color: #ffd27a; }
.caps-hint[hidden] { display: none; }
.login-btn { text-transform: none; letter-spacing: .02em; font-size: 16px; font-weight: 700; margin-top: 4px; }
.login-btn:disabled { opacity: .7; cursor: wait; transform: none; }
.login-footer { margin-top: 22px; line-height: 1.6; color: rgba(255,255,255,0.45); }
@media (max-width: 480px) { .login-card { padding: 32px 22px 24px; } .login-title .main-title { font-size: 21px; } }

/* ─── Aşama 1: ana sayfa sıkı düzen, ayarlar tek sayfa, imza ─── */
#page-dashboard .stats-grid { gap: 14px; margin-bottom: 14px; }
#page-dashboard .stat-card { padding: 14px 18px; }
#page-dashboard .stat-value { font-size: 26px; }
#page-dashboard .stat-icon { font-size: 26px; }
.quick-actions.qa-compact { grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.qa-compact .quick-action-card { padding: 10px 14px; gap: 10px; align-items: center; }
.qa-compact .qa-icon { width: 34px; height: 34px; font-size: 17px; }
.qa-compact .qa-label { font-size: 14px; }
.card-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.settings-grid > .card { margin-top: 0 !important; }
.check-line { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 4px 0 12px; cursor: pointer; }
.audit-modal { width: min(1000px, 94vw); max-height: 88vh; display: flex; flex-direction: column; }
.audit-scroll { overflow: auto; max-height: 58vh; }
.print-sign { margin-top: 36px; display: flex; justify-content: flex-end; }
.print-sign div { text-align: center; min-width: 220px; }
.print-sign .ps-date { margin-bottom: 40px; }
.print-sign .ps-name { font-weight: 700; }
@media (max-width: 1000px) { .settings-grid { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .quick-actions.qa-compact { grid-template-columns: 1fr; } }
.audit-foot { text-align: center; font-size: 13px; color: var(--gray-400); padding: 12px; }
.audit-foot[hidden] { display: none; }

/* Aşama 2: personel / kurucu müdür / noter belgesi */
.card-links { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.card-links .nav-btn { height: 30px; font-size: 13px; }
.doc-box { display: flex; flex-direction: column; gap: 10px; }
.doc-state { font-size: 14px; }
.doc-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-btns label.btn { cursor: pointer; }
.doc-print-frame { position: fixed; right: 0; bottom: 0; width: 1px; height: 1px; border: 0; opacity: 0; pointer-events: none; }
#page-kurucu .notice { margin-bottom: 16px; }
/* Kaydet çubuğu ekranın altına yapışsın: .main'deki overflow-x:hidden onu kaydırma kabı yapıp sticky'yi bozuyordu; clip kap oluşturmaz */
.main { overflow-x: clip; min-width: 0; }
/* Kaydet çubuklu her form/sayfa: içerik kısa olsa da çubuk ekranın en altında (tek kalıp: .bar-page > .save-bar) */
.bar-page:not(.page):not([hidden]), .page.bar-page.active { display: flex; flex-direction: column; min-height: calc(100dvh - 64px - 30px); }
.bar-page > * { flex-shrink: 0; }
.bar-page > .save-bar { margin-top: auto; }
@media (max-width: 768px) { .bar-page:not(.page):not([hidden]), .page.bar-page.active { min-height: calc(100dvh - 60px - 14px); } }
/* Sistem Ayarları: Kurum Bilgileri kartı yanındaki Kabul Komisyonu kartıyla aynı boyda; Kaydet kartın dibinde */
#page-ayarlar > .settings-grid { align-items: stretch; }
.card-stretch { display: flex; flex-direction: column; }
.card-stretch > .card-foot { margin-top: auto; padding-top: 12px; }
/* ? bilgi düğmesi + yetkiler penceresi */
.help-btn { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--gray-200); background: #fff; color: var(--gray-600); font-weight: 700; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.help-btn:hover, .help-btn:focus-visible { border-color: var(--red); color: var(--red); background: var(--red-bg); outline: none; }
.roles-modal { max-width: 760px; width: 94vw; }
.roles-table td:not(:first-child), .roles-table th:not(:first-child) { text-align: center; white-space: nowrap; width: 84px; }
.roles-table td:first-child { font-size: 13px; }
/* ── Yoklama çizelgesi (ekran) ── */
.yk-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.yk-controls .mini-input { min-width: 0; width: auto; padding: 6px 10px; }
.yk-lock { border-left-color: var(--warn) !important; }
.yk-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.yk-title { font-size: 13px; font-weight: 700; color: var(--gray-600); letter-spacing: .3px; }
.yk-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.yk-tools[hidden] { display: none; }
.yk-wrap { overflow-x: auto; border: 1px solid var(--gray-200); border-radius: 10px; }
.yk-grid { border-collapse: collapse; width: 100%; min-width: max-content; font-size: 12px; }
.yk-grid th { background: var(--gray-50); color: var(--gray-600); font-weight: 700; padding: 6px 0; text-align: center; border-bottom: 1px solid var(--gray-200); min-width: 26px; }
.yk-grid td { border-bottom: 1px solid var(--gray-100); border-left: 1px solid var(--gray-100); text-align: center; height: 30px; padding: 0; }
.yk-grid .yk-sno { width: 38px; color: var(--gray-400); border-left: 0; }
.yk-grid .yk-ad { text-align: left; padding: 0 10px; white-space: nowrap; font-weight: 600; position: sticky; left: 0; background: #fff; z-index: 1; min-width: 170px; }
.yk-grid th.yk-ad { background: var(--gray-50); }
.yk-grid .yk-we { background: #faf6f3; }
.yk-cell { font-weight: 700; cursor: default; user-select: none; }
.yk-cell[role="button"] { cursor: pointer; }
.yk-cell[role="button"]:hover { box-shadow: inset 0 0 0 2px var(--gray-200); }
.yk-cell:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
.yk-X, .yk-c.yk-X { background: var(--ok-bg) !important; color: var(--ok); }
.yk-İ, .yk-c.yk-İ { background: var(--info-bg) !important; color: var(--info); }
.yk-H, .yk-c.yk-H { background: var(--warn-bg) !important; color: var(--warn); }
.yk-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--gray-100); }
.yk-legend { font-size: 13px; color: var(--gray-600); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.yk-c { display: inline-flex; width: 24px; height: 24px; border-radius: 6px; align-items: center; justify-content: center; font-weight: 700; margin-left: 8px; }
.yk-sign { text-align: center; font-size: 13px; color: var(--gray-600); min-width: 220px; }
.yk-sign-ad { font-weight: 700; color: var(--gray-800); margin-top: 6px; }
.yk-onay { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 8px; font-size: 13px; }
.yk-onay input { width: auto; padding: 6px 10px; }
/* ── Yoklama çıktısı (A4 yatay, resmi şablon düzeni) ── */
.ykp-page { page-break-after: always; break-after: page; font-family: 'Times New Roman', Times, serif; color: #000; }
.ykp-page:last-child { page-break-after: auto; break-after: auto; }
.print-sheet .ykp-head { width: 100%; border-collapse: collapse; margin-bottom: 4px; }
.print-sheet .ykp-head td { border: 1px solid #000; vertical-align: middle; text-align: center; padding: 4px; }
.ykp-logo { width: 90px; height: 70px; }
.ykp-logo img { max-width: 80px; max-height: 64px; object-fit: contain; }
.ykp-docname { font-size: 9px; text-align: left; font-weight: 700; }
.ykp-title { font-size: 15px; font-weight: 700; margin-top: 2px; }
.ykp-kurum { font-size: 11px; margin-top: 2px; }
.ykp-meta { display: flex; justify-content: space-between; font-size: 11px; margin: 4px 0; }
.ykp-band { border: 1px solid #000; border-bottom: 0; text-align: center; font-size: 11px; font-weight: 700; padding: 2px; }
.ykp-sub { font-weight: 400; }
.print-sheet .ykp-grid { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 9.5px; }
.print-sheet .ykp-grid th, .print-sheet .ykp-grid td { border: 1px solid #000; padding: 0; text-align: center; height: 17px; }
.ykp-grid .ykp-sno { width: 26px; }
.ykp-grid .ykp-ad { width: 150px; text-align: left !important; padding-left: 3px !important; white-space: nowrap; overflow: hidden; }
.ykp-grid .ykp-off { background: #ddd; }
.ykp-bottom { display: flex; justify-content: space-between; align-items: flex-start; margin-top: 6px; font-size: 11px; }
.ykp-sign { text-align: center; min-width: 200px; line-height: 1.5; }
.ykp-sign-ad { font-weight: 700; margin-top: 18px; }
.ykp-footer { font-size: 9px; font-style: italic; margin-top: 6px; border-top: 1px solid #000; padding-top: 2px; }
@media print { .print-sheet .ykp-grid td, .print-sheet .ykp-grid th { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.print-sheet .ykp-grid th { background: #fff !important; color: #000 !important; font-weight: 700; padding: 0 !important; font-size: 9.5px; letter-spacing: 0; text-transform: none; }
.print-sheet .ykp-grid td { color: #000; background: #fff; }
.print-sheet .ykp-grid td.ykp-off { background: #ddd; }
@media print { html, body { background: #fff !important; } }
.print-sheet .ykp-page, .print-sheet .ykp-page * { color: #000; }
.yk-period { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 14px; }
.yk-period .mini-input { width: auto; min-width: 0; padding: 7px 12px; font-weight: 700; font-size: 15px; }
.yk-arrow { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--gray-200); background: #fff; font-size: 22px; line-height: 1; color: var(--gray-600); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding-bottom: 3px; }
.yk-arrow:hover, .yk-arrow:focus-visible { border-color: var(--red); color: var(--red); background: var(--red-bg); outline: none; }
.btn[hidden], .yk-tools[hidden] { display: none !important; }
.yk-grid td.yk-off { background: repeating-linear-gradient(45deg, var(--gray-50), var(--gray-50) 4px, var(--gray-100) 4px, var(--gray-100) 8px); }
.yk-tur { display: inline-flex; gap: 8px; flex-wrap: wrap; }

/* ─── Formlar (Aşama 4) ─── */
.fm-new { display: flex; gap: 10px; flex-wrap: wrap; }
.fm-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.fm-checks .engel-item { margin: 0; }
#fm-etki, #fm-arsiv { margin-bottom: 16px; }
.yk-cell.yk-form, .yk-c.yk-form { position: relative; cursor: help; }
.yk-cell.yk-form::after, .yk-c.yk-form::after { content: ''; position: absolute; top: 2px; right: 2px; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
/* çıktı: A4 dikey, resmi form düzeni */
.fp-page { font-family: 'Times New Roman', Times, serif; color: #000; font-size: 11.5px; }
.print-sheet .fp-page, .print-sheet .fp-page * { color: #000; }
.print-sheet .fp-head { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.print-sheet .fp-head td { border: 1px solid #000; vertical-align: middle; text-align: center; padding: 4px; }
.fp-logo { width: 95px; height: 78px; }
.fp-logo img { max-width: 86px; max-height: 70px; object-fit: contain; }
.fp-docname { font-size: 9px; text-align: left; font-weight: 700; }
.fp-title { font-size: 15px; font-weight: 700; margin-top: 4px; }
.fp-kurum { font-size: 11px; margin-top: 3px; }
.print-sheet .fp-t { width: 100%; border-collapse: collapse; table-layout: fixed; margin: 0; }
.print-sheet .fp-t th, .print-sheet .fp-t td { border: 1px solid #000; padding: 4px 6px; vertical-align: top; text-align: left; font-size: 11.5px; background: #fff !important; color: #000 !important; text-transform: none; letter-spacing: 0; }
.print-sheet .fp-t th { width: 24%; font-weight: 700; }
.print-sheet .fp-t td.fp-band, .print-sheet .fp-band { text-align: center; font-weight: 700; background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.print-sheet .fp-t tr { height: 28px; }
.print-sheet .fp-t tr.fp-tall { height: 64px; }
.print-sheet .fp-t tr.fp-mid { height: 40px; }
.fp-opt { display: inline-flex; align-items: center; gap: 4px; margin-right: 12px; white-space: nowrap; }
.fp-box { display: inline-block; width: 11px; height: 11px; border: 1px solid #000; position: relative; flex-shrink: 0; }
.fp-box.on::after { content: '✕'; position: absolute; inset: -3px 0 0 1px; font-size: 11px; line-height: 14px; font-weight: 700; }
.print-sheet .fp-t tr.fp-sign td { height: 78px; text-align: center; }
.fp-sad { font-weight: 700; margin-top: 10px; min-height: 16px; }
.fp-gap { height: 10px; }
.print-sheet .fp-t td.fp-barkod { height: 90px; }
.print-sheet .fp-t td.fp-note { font-style: italic; text-align: center; }
.print-sheet .fp-t tr.fp-sign3 td > div { display: inline-block; width: 32.5%; text-align: center; vertical-align: top; min-height: 70px; }
.fp-small { font-size: 9.5px; margin-top: 6px; line-height: 1.4; }
.fp-footer { display: flex; justify-content: space-between; font-size: 9px; font-style: italic; margin-top: 8px; border-top: 1px solid #000; padding-top: 2px; }
.fp-letter { font-size: 12.5px; line-height: 1.55; }
.fp-letter p { text-indent: 36px; margin: 0 0 8px; text-align: justify; }
.fp-ldate { text-align: right; margin: 6px 0; }
.fp-lmeta span { display: inline-block; width: 44px; }
.fp-lto { text-align: center; font-weight: 700; margin: 14px 0 12px; }
.fp-lsign { margin: 6px 0 14px auto; width: 230px; text-align: center; }
.fp-lsign .fp-sad { margin-top: 24px; }
.fp-hbox { border: 1px solid #000; border-bottom: 0; padding: 3px; }
.print-sheet .fp-hosp td { width: 50%; height: 110px; }
.fp-hon { text-align: center; margin-top: 46px; }
.fp-contact { margin-top: 14px; font-size: 11px; line-height: 1.5; border-top: 1px solid #000; padding-top: 4px; }
.fp-hosp .fp-opt { white-space: normal; align-items: flex-start; margin-right: 0; }
.fp-hosp .fp-box { margin-top: 2px; }
.mz-karar { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.mz-karar .btn { justify-content: flex-start; }
.mzp-top { display: flex; justify-content: space-between; margin: 10px 0; font-size: 12.5px; }
.mzp-opts { margin: 8px 0 10px; font-size: 12.5px; }
.mzp-p { font-size: 12.5px; line-height: 1.5; text-indent: 36px; margin: 0 0 12px; }
.mzp-sign { width: 240px; margin: 14px 0 14px auto; text-align: center; font-size: 12px; }
.mzp-sign .fp-sad { margin-top: 26px; }
.mzp-karar { font-size: 12.5px; line-height: 2.1; margin-top: 18px; }

/* ─── Hasta kabul çıktısı: tek sayfa ─── */
.print-sheet .hkp { font-size: 11px; }
.print-sheet .hkp h1 { font-size: 17px; margin: 0 0 2px; }
.print-sheet .hkp h2 { font-size: 11.5px; margin: 10px 0 4px; }
.print-sheet .hkp table { font-size: 11px; }
.print-sheet .hkp .kv td { padding: 3px 6px; }
.print-sheet .hkp .kv td:first-child { width: 30%; }
.hkp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.hkp-foto { width: 26mm; height: 34mm; object-fit: cover; border: 1px solid #000; }
.hkp-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.print-sheet .hkp .sign { margin-top: 26px; }

/* ─── Engelli İlk Kabul ─── */
.sidebar-item.sidebar-sub { padding-left: 34px; font-size: 13px; }
.sidebar-item.sidebar-sub .sidebar-icon { opacity: .6; }
.ik-card { margin-bottom: 18px; }
.ik-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 16px; }
.ik-grid .field { margin: 0; }
.ik-wide { grid-column: 1 / -1; }
.ik-diagram { display: flex; justify-content: center; gap: 40px; margin: 4px 0 16px; }
.ik-diagram figure { margin: 0; text-align: center; }
.ik-diagram img { height: 200px; width: auto; }
.ik-diagram figcaption { font-weight: 700; font-size: 12px; }
#ik-scan-note { margin-bottom: 16px; }
tr.row-active td { background: var(--red-bg) !important; }
/* çıktı */
.print-sheet .ikp-t { margin-bottom: 6px; }
.print-sheet .ikp-foto { width: 30mm; text-align: center; vertical-align: middle; font-size: 9px; }
.print-sheet .ikp-foto img { width: 26mm; height: 33mm; object-fit: cover; }
.print-sheet .fp-t td.ikp-mid { height: 90px; }
.print-sheet .fp-t td.ikp-big { height: 520px; }
.ikp-sign { display: flex; justify-content: space-between; margin-top: 18px; font-size: 12px; text-align: center; }
.ikp-sign > div { min-width: 200px; }
.ikp-sign3 > div { flex: 1; min-width: 0; }
.ikp-sign1 { margin-top: 16px; font-size: 12px; }
.ikp-page { page-break-after: always; break-after: page; }
.ikp-page:last-child { page-break-after: auto; break-after: auto; }
.ikp-body { display: flex; justify-content: space-around; margin: 10px 0; }
.ikp-body figure { margin: 0; text-align: center; }
.ikp-body figcaption { font-weight: 700; margin-bottom: 4px; }
.ikp-body img { height: 62mm; width: auto; }
.ikp-konu { margin: 8px 0; font-size: 12.5px; }
.ikp-metin { min-height: 150mm; font-size: 12.5px; line-height: 1.6; border-top: 1px solid #000; padding-top: 8px; text-indent: 36px; }
#page-ilk-kabul .table-wrapper th { white-space: normal; line-height: 1.25; padding: 10px 10px; font-size: 11px; vertical-align: middle; }
#page-ilk-kabul .table-wrapper td { padding: 10px 10px; }
#ik-list td:first-child strong { white-space: nowrap; }

/* ─── Harçlıklar ─── */
.hr-tabs2 { margin: 0 0 16px; display: inline-flex; }
#page-hacliklar .card[data-hr] { margin-bottom: 18px; }
.hr-birim { max-width: 120px; }
.hr-sub { margin: 18px 0 8px; font-size: 13px; color: var(--gray-600); }
table.hr-edit input, table.hr-edit select { width: 100%; min-width: 90px; padding: 6px 8px; border: 1.5px solid var(--gray-200); border-radius: 8px; font: inherit; font-size: 13px; background: #fff; }
table.hr-edit td { padding: 6px 6px; }
.hr-foot td { font-weight: 700; background: var(--gray-50); }
.hr-preview { overflow-x: auto; border: 1px solid var(--gray-200); border-radius: 10px; padding: 12px; background: #fff; }
.hr-preview .print-sheet { padding: 0; min-width: 1000px; }
.print-sheet .hrp-ad { font-size: 12px; margin: 6px 0; }
.print-sheet .hrp-t { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 10.5px; color: #000; }
.print-sheet .hrp-t th, .print-sheet .hrp-t td { border: 1px solid #000; padding: 3px 4px; height: 22px; background: #fff !important; color: #000 !important; text-transform: none; letter-spacing: 0; vertical-align: middle; }
.print-sheet .hrp-t th { font-weight: 700; text-align: center; }
.hrp-tar { width: 70px; } .hrp-tut { width: 95px; } .hrp-bak { width: 130px; } .hrp-imza { width: 70px; }
.print-sheet .hrp-t td.hrp-sum { text-align: right; font-weight: 700; }

/* ─── Sistem Ayarları sekmeleri ─── */
#page-ayarlar .page-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.ay-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.ay-tabs button { border: 1.5px solid var(--gray-200); background: #fff; color: var(--gray-600); border-radius: 10px; padding: 10px 16px; font: 600 14px var(--font-body); cursor: pointer; }
.ay-tabs button:hover { border-color: var(--red); color: var(--red); }
.ay-tabs button.active { background: var(--red); border-color: var(--red); color: #fff; }
.ay-body > .card, #page-ayarlar > .card[data-ay-sec] { max-width: 980px; margin-bottom: 18px; }
#page-ayarlar .card[hidden] { display: none !important; }

/* ─── Kontrast: gün ışığında okunabilirlik (Abdullah 2026-11-19) ─── */
:root {
  --cream: #efe6e0; --readonly-bg: #ede6e1;
  --gray-50: #f1f1f1; --gray-100: #e4e4e4; --gray-200: #c9c9c9;
  --gray-400: #6b6b6b; --gray-600: #3a3a3a; --gray-800: #111;
  --red-bg: #fbe6e6; --ok-bg: #e0f2e7; --warn-bg: #fdf0cc; --info-bg: #dbe7fb;
}
.card { box-shadow: 0 2px 10px rgba(0,0,0,0.10); border: 1px solid #ddd3cd; }
.field input, .field select, .field textarea { border-color: var(--gray-200); color: var(--gray-800); }
.field label { color: var(--gray-600); }
::placeholder { color: #8a8a8a; opacity: 1; }

/* ─── Finans / fatura ─── */
.fn-card { max-width: 760px; }
.fn-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--gray-200); padding-bottom: 14px; margin-bottom: 16px; }
.fn-h1 { font-family: var(--font-head); font-size: 26px; font-weight: 800; color: var(--red-dark); }
.fn-h2 { font-size: 13px; color: var(--gray-400); }
.fn-no { text-align: right; font-size: 12px; color: var(--gray-400); }
.fn-no b { display: block; font-size: 20px; color: var(--gray-800); }
.fn-sum { margin-top: 6px; padding: 12px 14px; background: var(--gray-50); border-radius: 10px; font-size: 14px; }
.print-sheet .fnp { font-size: 12px; color: #000; }
.fnp-top { display: flex; justify-content: space-between; gap: 20px; border-bottom: 2px solid #000; padding-bottom: 10px; }
.fnp-sat { display: flex; gap: 10px; line-height: 1.5; max-width: 55%; }
.fnp-logo img { max-width: 70px; max-height: 60px; }
.fnp-title { text-align: right; }
.fnp-h1 { font-size: 22px; font-weight: 800; letter-spacing: 1px; }
.fnp-h2 { font-size: 11px; margin-bottom: 6px; }
.print-sheet table.fnp-meta { width: auto; margin-left: auto; font-size: 12px; }
.print-sheet .fnp-meta th, .print-sheet .fnp-meta td { border: 1px solid #000; padding: 3px 8px; text-align: left; background: #fff !important; color: #000 !important; text-transform: none; letter-spacing: 0; }
.fnp-alici { margin: 14px 0; padding: 10px 12px; border: 1px solid #000; width: 60%; line-height: 1.5; }
.fnp-lbl { font-size: 10px; font-weight: 700; }
.print-sheet table.fnp-t { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.print-sheet .fnp-t th, .print-sheet .fnp-t td { border: 1px solid #000; padding: 5px 6px; background: #fff !important; color: #000 !important; text-transform: none; letter-spacing: 0; }
.print-sheet .fnp-t th { font-weight: 700; text-align: center; }
.fnp-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 10px; }
.fnp-yazi { flex: 1; padding-top: 4px; }
.fnp-iban { margin-top: 8px; }
.print-sheet table.fnp-tot { width: 300px; border-collapse: collapse; }
.print-sheet .fnp-tot th, .print-sheet .fnp-tot td { border: 1px solid #000; padding: 5px 8px; text-align: right; background: #fff !important; color: #000 !important; text-transform: none; letter-spacing: 0; }
.print-sheet .fnp-tot th { text-align: left; font-weight: 600; }
.print-sheet .fnp-g th, .print-sheet .fnp-g td { font-weight: 800; font-size: 13px; }
.fnp-sign { display: flex; justify-content: space-between; margin-top: 50px; text-align: center; }
.fnp-sign > div { width: 220px; border-top: 1px solid #000; padding-top: 4px; font-weight: 700; }
.fnp-sign span { font-weight: 400; font-size: 11px; }

/* ─── Personel özlük dosyası + mesajlar ─── */
#ay-personel > .card, #ay-personel .oz-card { max-width: 980px; margin-bottom: 18px; }
.oz-sel select { font-size: 15px; }
.oz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px 16px; }
.oz-grid .field { margin: 0; }
.oz-wide { grid-column: 1 / -1; }
.oz-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.oz-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-top: 14px; }
.oz-doc { border: 1.5px dashed var(--gray-200); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.oz-doc-list { font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.oz-doc-item a { color: var(--red-dark); font-weight: 600; text-decoration: none; }
.oz-iban { display: flex; gap: 8px; align-items: center; }
.oz-iban input { flex: 1; }
.hint.ok { color: var(--ok); } .hint.bad { color: var(--red); }
.msg-dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #ffcc00; margin-left: 22px; margin-top: -18px; border: 2px solid var(--bar-1); }
.topbar-user { position: relative; }
.um-count { background: var(--red); color: #fff; border-radius: 50px; padding: 0 7px; font-size: 11px; margin-left: 6px; }
.inbox-list { max-height: 60vh; overflow: auto; display: flex; flex-direction: column; gap: 10px; margin: 6px 0 12px; }
.inbox-item { border: 1px solid var(--gray-200); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.inbox-item.unread { border-color: var(--red); background: var(--red-bg); }
.inbox-meta { font-size: 12px; color: var(--gray-600); margin-bottom: 4px; }
.inbox-konu { font-weight: 700; margin-bottom: 2px; }

/* personel kimlik fotokopisi: bırakma alanı + küçük resim (fotoğraf kutusu gibi) */
.oz-kml-drop { margin-bottom: 18px; padding: 14px 18px; }
.oz-kml-thumb { width: 132px; height: 84px; flex: 0 0 132px; border: 1px solid var(--gray-200); border-radius: 8px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.oz-kml-thumb img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.oz-kml-drop.busy { opacity: .6; pointer-events: none; }
.oz-kml-print { max-width: 100%; max-height: 120mm; margin-top: 14px; border: 1px solid #999; }
.oz-foto-btns { display: flex; gap: 6px; justify-content: center; }
.oz-kml-btns { display: flex; flex-direction: column; gap: 6px; }
/* sol menü: alçak ekranlarda (dizüstü + tarayıcı çubukları) kaydırmadan sığsın — yazı boyutu aynı, yalnız boşluklar azalır */
@media (min-width: 769px) and (max-height: 860px) {
  .sidebar-section { padding: 2px 0; }
  .sidebar-section-title { padding: 7px 22px 1px; line-height: 1.2; }
  .sidebar-item { padding: 6px 20px; line-height: 1.3; }
  .sidebar-icon { line-height: 1; }
}
@media (min-width: 769px) and (max-height: 620px) {
  .sidebar-section-title { padding: 8px 22px 2px; }
  .sidebar-item { padding: 5px 20px; }
}
