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

html, body {
    height: 100%;
    
}

:root {
    --bg: #f4f6fb;
    --surface: #ffffff;
    --accent: #8B0000;
    --accent-light: #fde8e8;

    --text: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;

    --green: #16a34a;
    --green-bg: #dcfce7;

    --blue: #2563eb;
    --blue-bg: #dbeafe;

    --yellow: #b45309;
    --yellow-bg: #fef3c7;

    --red: #dc2626;
    --red-bg: #fee2e2;

    --radius: 12px;
    --shadow: 0 4px 18px rgba(0,0,0,0.06);
}


body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}


nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;

    display: flex;
    align-items: center;
    justify-content: space-between;
     height: 70px;
    padding: 12px 5%;
    background: rgba(139,0,0,0.96);
    backdrop-filter: blur(6px);
}

.nav-logo-img {
    height: 70px;
    width: auto;
    filter: brightness(0) invert(1);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    font-size: 14px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    transition: 0.2s;
}

.nav-links a:hover,
.nav-links a.checked {
    color: #fff;
    font-weight: 600;
}

.nav-btn {
    background: #fff;
    color: var(--accent);
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}


.main-layout {
     display: flex;
    justify-content: center;   /* centers horizontally */
    
    height: 100vh;
    padding: 90px 1.5rem 1.5rem;
}


.history-panel {
   width: 100%;
    max-width: 1500px; 

    height: 100%;
    display: flex;
    flex-direction: column;
}


.history-header {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border);

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-header h3 {
    font-size: 15px;
    font-weight: 700;
}

.history-badge {
    background: var(--accent);
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 20px;
}

.history-filter {
    display: flex;
    gap: 6px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

.filter-lbl {
    flex: 1;
    text-align: center;
    font-size: 12px;
    padding: 6px;

    border-radius: 8px;
    border: 1px solid var(--border);
    color: var(--muted);
    cursor: pointer;

    transition: 0.2s;
}

.filter-lbl:hover {
    background: var(--accent-light);
    color: var(--accent);
}


#f-all:checked ~ .main-layout .lbl-all,
#f-done:checked ~ .main-layout .lbl-done,
#f-wait:checked ~ .main-layout .lbl-wait,
#f-miss:checked ~ .main-layout .lbl-miss {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}


.history-list {
   flex: 1;             
    overflow-y: auto;
}


.history-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;

    padding: 12px 16px;
    border-bottom: 1px solid var(--border);

    transition: 0.2s;
}

.history-item:hover {
    background: #f9fafb;
}


.h-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 16px;
}


.h-title {
    font-size: 13px;
    font-weight: 600;
}

.h-sub {
    font-size: 11px;
    color: var(--muted);
}

.h-num {
    font-family: monospace;
    font-size: 11px;
    background: var(--accent-light);
    color: var(--accent);
    padding: 2px 6px;
    border-radius: 6px;
}

.h-right {
    text-align: right;
}


.h-status {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 600;
}


.h-status.done {
    background: var(--green-bg);
    color: var(--green);
}

.h-status.active {
    background: var(--blue-bg);
    color: var(--blue);
}

.h-status.waiting {
    background: var(--yellow-bg);
    color: var(--yellow);
}

.h-status.missed {
    background: var(--red-bg);
    color: var(--red);
}


.h-time {
    font-size: 10px;
    color: var(--muted);
    margin-top: 4px;
}

#f-done:checked ~ .main-layout .history-item:not(.is-done) {
    display: none;
}

#f-wait:checked ~ .main-layout .history-item:not(.is-waiting) {
    display: none;
}

#f-miss:checked ~ .main-layout .history-item:not(.is-missed) {
    display: none;
}


@media (max-width: 900px) {
    .main-layout {
        grid-template-columns: 1fr;
        padding: 90px 1rem 1rem;
    }

    .history-panel {
        position: relative;
        top: 0;
    }
}

 /* Overlay */
  .overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 100;
  }
  .overlay.active {
    opacity: 1;
    pointer-events: all;
  }
 
  /* Sidebar */
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 270px;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    transform: translateX(-100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 110;
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', sans-serif;
  }
  .sidebar.open {
    transform: translateX(0);
  }
 
  /* Header */
  .sb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 12px;
    border-bottom: 1px solid #e5e7eb;
  }

 .nav-item.logout{
    font-size: 13px;
    color: #6b7280;
    border-radius: 10px;
  }
  .sb-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
  }
  .close-btn {
    width: 30px; height: 30px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #6b7280;
  }
  .close-btn:hover { background: #f3f4f6; }
 
  /* Profile */
  .profile-section {
    padding: 20px 16px 16px;
    border-bottom: 1px solid #e5e7eb;
  }
  .avatar {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: #4A1B0C;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: #F5C4B3;
    margin-bottom: 10px;
  }
  .profile-name {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
  }
  .profile-email {
    font-size: 12px;
    color: #6b7280;
  }
  .role-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
  }
  .role-pill.registrar {
     background: #FAECE7;
      color: #993C1D; 
    }
  .role-pill.cashier   {
     background: #E1F5EE; 
     color: #0F6E56;
     }
  .role-dot {
     width: 6px;
      height: 6px;
       border-radius: 50%;
     }
  .role-pill.registrar .role-dot {
     background: #D85A30; 
    }
  .role-pill.cashier   .role-dot { 
    background: #1D9E75;
 }
 
  /* Section Label */
  .section-label {
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 14px 16px 6px;
    background-color: #ffffff;
  }
 
  /* Nav Items */
  .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    cursor: pointer;
    color: #111827;
    font-size: 14px;
    transition: background 0.15s;
    text-decoration: none;
  }
  .nav-item:hover, .nav-item.active {
     background: #777777;
     }
  .nav-item.logout span { 
    font-size: 13px; 
    color: #8b0000; 
     font-weight: 600;
      }
 
  .nav-icon {
    width: 32px; 
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .nav-icon.blue  { 
    background: #E6F1FB; 
}
  .nav-icon.amber {
     background: #FAEEDA;
     }
  .nav-icon.coral {
     background: #FAECE7;
     }
  .nav-icon.teal  {
     background: #E1F5EE;
     }
  .nav-icon.gray  { 
    background: #f3f4f6; 
}
 
  .history-badge {
    margin-left: auto;
    font-size: 11px;
    background: #f3f4f6;
    color: #6b7280;
    padding: 2px 7px;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
  }
 

  .role-section { 
    padding: 10px 16px 4px; 
    background-color: #ffffff;
    
}
  .role-label {
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
  }
  .role-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .role-btn {
    padding: 8px 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'Segoe UI', sans-serif;
  }
  .role-btn:hover { 
    background: #f3f4f6; 
}
  .role-btn.selected.reg  {
     background: #FAECE7; 
     border-color: #F0997B;
      color: #993C1D; 
    }
  .role-btn.selected.cash { 
    background: #E1F5EE; 
    border-color: #5DCAA5;
     color: #0F6E56;
     }
 
  /* Footer */
  .sb-footer {
    margin-top: auto;
    padding: 14px 16px;
    border-top: 1px solid #e5e7eb;
   
    background-color: #ffffff;
    color: #000000;
    border-radius: 0 0 8px 8px;


  }
 
  /* Hamburger Button */
  .hamburger {
    width: 36px; 
    height: 36px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: 8px;
    padding: 0;
    
  }
  .hamburger:hover {
      background: #c20000;
     }
  .bar {
    width: 20px; 
    height: 2px;
     background: #eef0f4;
    border-radius: 2px;
    transition: all 0.25s;
  }
  .hamburger.active .bar:nth-child(1) { 
    transform: translateY(7px) rotate(45deg);
 }
  .hamburger.active .bar:nth-child(2) { 
    opacity: 0; transform: scaleX(0);
 }
  .hamburger.active .bar:nth-child(3) {
     transform: translateY(-7px) rotate(-45deg);
     }
.profile-section{
    background: #bebebe;
    color: #fff9f7;
    
}

.nav-item{
   background-color: #ffffff;
    color: #000000;
}

.nav-item.active{
   background: #777777;
    color: #000000;
}



.history-login {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

.history-login input {
    flex: 1;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 12px;
    outline: none;
}

.history-login input:focus {
    border-color: var(--accent);
}

.history-login button {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    background: var(--accent);
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s;
}

.history-login button:hover {
    opacity: 0.85;
}

.history-item {
    animation: fadeInUp 0.4s ease;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 800px) {
    .nav-links {
        display: flex !important; 
        gap: 1rem;
        width: 100%;
        justify-content: center;
        margin-top: 8px;
    }
    .nav-links a {
        font-size: 14px;
    }
}

/* ── Clear History button ── */
.clear-history-btn {
    display: block;
    margin: 12px auto;
    padding: 8px 20px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}
.clear-history-btn:hover {
    background: #b91c1c;
}