*{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Arial,sans-serif;color:#1f2937;background:#f8fafc}
.layout{display:flex;min-height:100vh}
.sidebar{position:fixed;left:0;top:0;bottom:0;height:100vh;z-index:1000;width:240px;background:#0f172a;color:#e2e8f0;display:flex;flex-direction:column;padding:16px 12px;gap:12px;transition:transform .2s ease;overflow:auto;transform:translateX(0)}
.sidebar.collapsed{transform:translateX(-110%);padding:16px 0}
.logo{font-weight:700;letter-spacing:.08em;display:flex;justify-content:flex-end;align-items:center}
.logo .brand-logo{max-width:100%;height:36px;object-fit:contain;display:block}
.nav-btn{display:flex;align-items:center;width:100%;text-align:left;padding:10px 12px;border:none;background:#1e293b;color:#e2e8f0;border-radius:8px;cursor:pointer;transition:background .15s ease, transform .05s ease;text-decoration:none;min-height:44px;font-size:14px}
.nav-btn:hover{background:#334155}
.nav-btn:active{transform:scale(.98)}
.spacer{flex:1}
.content{flex:1;padding:24px;position:relative;margin-left:0}
.view.hidden{display:none}
label{display:block;margin:8px 0 4px}
input,select,button{padding:10px;border-radius:10px;border:1px solid #cbd5e1}
button{background:#2563eb;color:#fff;border:none;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.06)}
.btn-danger{background:#dc2626;color:#fff;border:1px solid #b91c1c}
button:hover{background:#1d4ed8}
button:active{transform:translateY(1px)}

/* Center login form */
#login-view{display:flex;align-items:center;justify-content:center;min-height:calc(100vh - 48px)}
#login-view form{background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:20px;min-width:300px;box-shadow:0 10px 20px rgba(0,0,0,0.05)}
.table{width:100%;border-collapse:collapse;background:#fff;border-radius:8px;overflow:hidden}
.table th,.table td{padding:10px;border-bottom:1px solid #e5e7eb}
.table tbody tr:hover{background:#f9fafb}
.error{color:#b91c1c;margin-top:8px}
.badge{padding:2px 8px;border-radius:999px;font-size:12px;display:inline-block}
.badge.green{background:#dcfce7;color:#166534}
.badge.gray{background:#e5e7eb;color:#334155}
.badge.yellow{background:#fef9c3;color:#854d0e}
/* Outline badges */
.badge.outline-red{background:#fff;color:#b91c1c;border:1px solid #ef4444}
.badge.outline-green{background:#fff;color:#166534;border:1px solid #22c55e}
.actions{display:flex;gap:6px}
.switch{display:inline-flex;align-items:center;gap:6px}
/* Ghost buttons for disabled state visuals */
.btn-ghost-red{background:#fff;color:#b91c1c;border:1px solid #ef4444}
.btn-ghost-green{background:#fff;color:#166534;border:1px solid #22c55e}
button:disabled{opacity:.7;cursor:not-allowed}

.day-grid{margin-top:12px;border:1px solid #e5e7eb;border-radius:8px;overflow:auto;background:#fff}
.day-grid .grid{display:grid;grid-auto-rows:minmax(32px,auto)}
.day-grid .header{position:sticky;top:0;background:#f1f5f9;z-index:1;display:grid}
.day-grid .cell{border-bottom:1px solid #e5e7eb;border-right:1px solid #e5e7eb;padding:6px 8px;font-size:12px;white-space:nowrap}
.day-grid .cell.room{font-weight:600;background:#f8fafc}
.day-grid .cell.booked{background:#e5e7eb;color:#475569}
.day-grid .cell.selected{background:#dbeafe;color:#1e40af}
.grid-wrap .legend{font-size:12px;color:#475569;margin-top:6px}
.create-form .row{display:grid;grid-template-columns:repeat(auto-fit, minmax(180px,1fr));gap:16px;margin:12px 0}

.hidden{display:none}

/* Hamburger toggle */
.hamburger{position:fixed;top:12px;left:12px;background:#0f172a;border:none;border-radius:8px;padding:8px 10px;z-index:1100;display:inline-flex;flex-direction:column;gap:4px}
.hamburger span{display:block;width:22px;height:2px;background:#e2e8f0}

/* Layout for filters and summary */
.filters{display:flex;gap:16px;align-items:stretch;justify-content:space-between;margin:12px 0;flex-wrap:wrap}
.filters > .panel, .filters > .summary{flex:1 1 0}
.filters .controls{display:flex;flex-wrap:wrap;gap:12px 16px;align-items:flex-end}
.panel{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:12px;min-width:320px}
.panel h4{margin:0 0 8px 0;font-size:14px;color:#111827}
.summary{min-width:320px;background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:12px}
.summary h4{margin:0 0 8px 0;font-size:14px;color:#111827}
.summary .item{font-size:13px;color:#374151;margin:4px 0}
.summary .row{display:grid;grid-template-columns:repeat(2, minmax(120px,1fr));gap:10px}
.summary .row.sm input{width:100%}

/* Floor colors for daily list (more vivid) */
.table tbody tr.floor-zemin{background:#bbf7d0}
.table tbody tr.floor-kat1{background:#c7d2fe}
.table tbody tr.floor-kat2{background:#fde68a}
.table tbody tr.floor-zemin td:first-child{border-left:4px solid #16a34a}
.table tbody tr.floor-kat1 td:first-child{border-left:4px solid #4f46e5}
.table tbody tr.floor-kat2 td:first-child{border-left:4px solid #f59e0b}

/* Day grid booked colors by floor */
.day-grid .cell{border-bottom:1px solid #e5e7eb;border-right:1px solid #e5e7eb;padding:6px 8px;font-size:12px;white-space:nowrap}
.day-grid .cell.room{font-weight:600;background:#f8fafc}
.day-grid .cell.booked{color:#1f2937; position:relative}
.day-grid .cell.booked.floor-zemin{background:#dcfce7;color:#166534}
.day-grid .cell.booked.floor-kat1{background:#e0e7ff;color:#3730a3}
.day-grid .cell.booked.floor-kat2{background:#fde68a;color:#78350f}
.day-grid .cell.booked.inside{background:#fecaca; color:#991b1b}
.day-grid .cell.booked.outside{background:#e5e7eb;color:#475569}
.day-grid .cell.booked.outside.pending{background:#dcfce7;color:#166534}
.day-grid .cell.booked.outside.exited{background:#e5e7eb;color:#475569}
.day-grid .cell.selected{background:#dbeafe;color:#1e40af}
.day-grid .cell:not(.booked){cursor:pointer}
.day-grid .cell.dirty-col{outline:2px solid #dc2626}
/* Fault (arıza) blinking */
@keyframes blink-yellow { 50% { background-color: #fef08a; } }
.day-grid .cell.fault-col { animation: blink-yellow 1s linear infinite; }
/* Room header fault label */
.day-grid .cell.room.header .fault-label{display:block;font-size:11px;color:#92400e;background:#fef3c7;border:1px solid #f59e0b;border-radius:6px;padding:2px 6px;margin-top:4px}
.res-title{font-weight:600}
.res-sub{font-size:11px;color:#475569}


/* Watermark logos */
/* Sidebar arka planında saydam logo */
.sidebar::before{
  content:"";
  position:absolute;
  inset:0;
  background:url('kizillogo.png') center/70% no-repeat;
  opacity:.08;
  pointer-events:none;
}

/* İçerik alanı (tüm sayfalar) arka planında saydam logo */
.content::before{
  content:"";
  position:absolute;
  inset:0;
  background:url('kizillogo.png') center/55% no-repeat;
  opacity:.04;
  pointer-events:none;
}

/* Login sayfasında tüm ekran arkasında saydam logo */
body.login::before{
  content:"";
  position:fixed;
  inset:0;
  background:url('kizillogo.png') center/40% no-repeat;
  opacity:.06;
  pointer-events:none;
  z-index:0;
}


/* Sidebar nav spacing for consistent vertical rhythm */
 .sidebar nav{display:flex;flex-direction:column;gap:8px}

/* Heading row with right-aligned actions */
.heading-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}

/* Numbering column */
.table td.col-no, .table th:first-child{width:48px;min-width:48px;text-align:center;color:#475569}

/* Günlük liste: İçeride olanlar için kırmızı vurgu ve tıklanabilirlik */
.table tbody tr.inside-row { background:#fecaca !important; color:#991b1b; }
.table tbody tr[data-id] { cursor: pointer; }

/* Modal styles */
.modal.hidden{display:none}
.modal{position:fixed;inset:0;z-index:2000}
.modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,0.5)}
.modal-dialog{position:relative;margin:3vh auto;background:#fff;width:min(840px, calc(100% - 24px));max-height:calc(100vh - 6vh);border-radius:12px;box-shadow:0 10px 30px rgba(2,6,23,0.25);display:flex;flex-direction:column;overflow:hidden}
.modal-header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;background:#0f172a;color:#e2e8f0}
.modal-body{padding:16px;display:flex;flex-direction:column;gap:12px;flex:1 1 auto;min-height:0;overflow:auto}
.modal-footer{display:flex;justify-content:flex-end;padding:12px 16px;gap:8px;border-top:1px solid #e2e8f0}
.modal-close{background:transparent;border:none;color:#e2e8f0;font-size:20px;cursor:pointer}
.modal .row{display:flex;gap:12px}
.modal .row > div{flex:1}
.modal input,.modal select,.modal textarea{width:100%;padding:8px;border:1px solid #cbd5e1;border-radius:8px}
.modal textarea{min-height:120px}

/* Unified status colors (override previous styles) */
/* Neutralize floor-based coloring */
.table tbody tr.floor-zemin, .table tbody tr.floor-kat1, .table tbody tr.floor-kat2 { background: inherit !important; color: inherit !important; }
.table tbody tr.floor-zemin td:first-child, .table tbody tr.floor-kat1 td:first-child, .table tbody tr.floor-kat2 td:first-child { border-left: 0 !important; }
.day-grid .cell.booked.floor-zemin, .day-grid .cell.booked.floor-kat1, .day-grid .cell.booked.floor-kat2 { background: inherit !important; color: inherit !important; }

/* Grid cells */
.day-grid .cell.booked.inside { background:#dbeafe !important; color:#1e3a8a !important; }
.day-grid .cell.booked.outside.pending, .cell.booked.pending { background:#fef9c3 !important; color:#854d0e !important; }
.day-grid .cell.booked.outside.exited, .cell.booked.exited { background:#fecaca !important; color:#7f1d1d !important; }

/* Daily list rows */
.table tbody tr.inside-row { background:#dbeafe !important; color:#1e3a8a !important; }
.table tbody tr.exited-row { background:#fecaca !important; color:#7f1d1d !important; }
.table tbody tr.pending-row { background:#fef9c3 !important; color:#854d0e !important; }
