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

:root {
  --bg-gradient: linear-gradient(135deg, #0d0f14 0%, #1a1c23 100%);
  --panel-bg: rgba(255, 255, 255, 0.03);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text-main: #f8f9fa;
  --text-muted: #9ba1a6;
  --gold-main: #e2c044;
  --gold-hover: #f3d562;
  --gold-gradient: linear-gradient(135deg, #d4af37 0%, #f3e5ab 100%);
  --danger: #ff4757;
  --success: #1abc9c;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 20px rgba(226, 192, 68, 0.3);
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  color: var(--gold-main);
  margin-bottom: 16px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

a {
  color: var(--gold-main);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--gold-hover);
  text-shadow: 0 0 8px rgba(226, 192, 68, 0.4);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Glassmorphism Panel */
.panel {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Forms & Inputs */
input, select, button {
  font-family: inherit;
  font-size: 1rem;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="month"],
input[type="number"],
select {
  width: 100%;
  padding: 14px 18px;
  margin: 8px 0 20px;
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  color: var(--text-main);
  transition: all 0.3s ease;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--gold-main);
  background-color: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 3px rgba(226, 192, 68, 0.15);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--gold-gradient);
  color: #000;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  text-align: center;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

.btn:active {
  transform: translateY(0);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn-danger {
  background: linear-gradient(135deg, #ff4757 0%, #ff6b81 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 71, 87, 0.2);
}
.btn-danger:hover {
  box-shadow: 0 8px 25px rgba(255, 71, 87, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
    color: #000;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.2);
}
.btn-warning:hover {
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--gold-main);
  border: 1px solid var(--gold-main);
  box-shadow: none;
}
.btn-outline:hover {
  background: rgba(226, 192, 68, 0.1);
  box-shadow: 0 0 15px rgba(226, 192, 68, 0.2);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

th, td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--panel-border);
}

th {
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

tr {
    transition: background-color 0.2s ease;
}

tr:hover td {
  background-color: rgba(255, 255, 255, 0.03);
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  background: rgba(13, 15, 20, 0.85);
  border-bottom: 1px solid var(--panel-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.navbar-brand {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.navbar-nav {
  display: flex;
  gap: 25px;
}

.navbar-nav a {
  color: var(--text-muted);
  font-weight: 500;
  position: relative;
}

.navbar-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: var(--gold-gradient);
    transition: width 0.3s ease;
}

.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--text-main);
  text-shadow: none;
}

.navbar-nav a:hover::after,
.navbar-nav a.active::after {
    width: 100%;
}

/* Badges */
.badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-family: 'Outfit', sans-serif;
  text-transform: uppercase;
}
.badge-success { background: rgba(26, 188, 156, 0.15); color: var(--success); border: 1px solid rgba(26, 188, 156, 0.3); }
.badge-danger { background: rgba(255, 71, 87, 0.15); color: var(--danger); border: 1px solid rgba(255, 71, 87, 0.3); }
.badge-warning { background: rgba(226, 192, 68, 0.15); color: var(--gold-main); border: 1px solid rgba(226, 192, 68, 0.3); }
.badge-secondary { background: rgba(155, 161, 166, 0.15); color: var(--text-muted); border: 1px solid rgba(155, 161, 166, 0.3); }

/* Grid Layouts */
.grid {
  display: grid;
  gap: 24px;
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Kiosk Cards */
.kiosk-member-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.kiosk-member-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--gold-gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.kiosk-member-card:hover {
  border-color: rgba(226, 192, 68, 0.5);
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-glow);
}

.kiosk-member-card:hover::before {
    opacity: 0.05;
}

.kiosk-member-card > * {
    position: relative;
    z-index: 1;
}

.kiosk-member-card h3 {
  color: var(--text-main);
  margin-bottom: 8px;
  font-size: 1.3rem;
  transition: color 0.3s ease;
}

.kiosk-member-card .team-name {
  font-size: 0.85rem;
  color: var(--gold-main);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.kiosk-member-card.attended {
  background: rgba(26, 188, 156, 0.05);
  border-color: rgba(26, 188, 156, 0.3);
  opacity: 0.8;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.kiosk-member-card.attended h3 {
  color: var(--success);
}

.kiosk-time-display {
    text-align: center;
    font-size: 4rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 4px 20px rgba(212, 175, 55, 0.2);
}

.kiosk-search-wrapper {
    max-width: 600px;
    margin: 0 auto 30px;
    position: relative;
}

.kiosk-search-input {
    width: 100%;
    padding: 16px 24px;
    font-size: 1.2rem;
    border-radius: 30px;
    border: 2px solid var(--panel-border);
    background: rgba(0,0,0,0.3);
    color: var(--text-main);
    transition: all 0.3s ease;
    text-align: center;
}

.kiosk-search-input:focus {
    border-color: var(--gold-main);
    box-shadow: var(--shadow-glow);
    background: rgba(0,0,0,0.5);
}

.modal-overlay {
    display: none; 
    position: fixed; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.85); 
    z-index: 999; 
    justify-content: center; 
    align-items: center; 
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    width: 90%; 
    max-width: 450px; 
    text-align: center; 
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px 30px;
    transform: scale(0.9);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-title {
    font-size: 2rem;
    margin-bottom: 15px;
}

/* ==========================================================
   MOBILE RESPONSIVENESS (for Handphone usage)
   ========================================================== */
@media screen and (max-width: 768px) {
    /* Navbar stack */
    .navbar {
        flex-direction: column;
        padding: 16px 20px;
        text-align: center;
    }
    
    .navbar-brand {
        margin-bottom: 15px;
    }

    .navbar-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .navbar-nav a {
        font-size: 0.9rem;
        padding: 4px 8px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 6px;
        white-space: nowrap;
    }
    
    .navbar-nav a::after {
        display: none;
    }

    .navbar-nav a.active {
        background: rgba(226, 192, 68, 0.2);
    }

    /* Container and panels */
    .container {
        padding: 10px;
    }

    .panel {
        padding: 15px 12px;
    }

    /* General Grid */
    .grid, .grid-2, .grid-3, .grid[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    
    /* Kiosk Grid specifically for names - Two columns to fit more options, less scrolling */
    #kiosk-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }

    /* Kiosk Member Cards compact design */
    .kiosk-member-card {
        padding: 12px 8px;
        border-radius: 12px;
    }

    .kiosk-member-card h3 {
        font-size: 1rem;
        margin-bottom: 5px;
    }

    .kiosk-member-card .team-name {
        font-size: 0.7rem;
        margin-bottom: 6px;
        letter-spacing: 0.5px;
    }
    
    .kiosk-member-card .badge, 
    .kiosk-member-card .btn-sm {
        font-size: 0.65rem;
        padding: 4px 6px;
        margin-top: 5px !important;
    }

    /* Typography downsizing */
    h1, .kiosk-header-title { font-size: 1.6rem !important; margin-bottom: 8px !important; }
    h2 { font-size: 1.3rem !important; }
    h3 { font-size: 1.1rem !important; }
    
    .kiosk-header-subtitle {
        font-size: 0.85rem !important;
        margin-bottom: 10px !important;
    }

    /* Table Responsive Enhancements */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
        margin-bottom: 10px;
    }
    
    th, td {
        padding: 12px;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    /* Kiosk Dashboard */
    .kiosk-time-display {
        font-size: 2.5rem !important;
        margin-bottom: 5px !important;
    }
    
    .kiosk-search-input {
        padding: 12px 16px;
        font-size: 0.95rem;
        margin-bottom: 15px;
    }
    
    .kiosk-search-wrapper {
        margin-bottom: 15px;
    }
    
    /* Modify layout arrays in reports dashboard actions */
    div[style*="display:flex; justify-content:space-between; align-items:center;"] {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 15px;
    }
}
