/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background: #0b0e14;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 12px;
}

/* ===== MOBILE APP CONTAINER ===== */
.app-container {
    max-width: 400px;
    width: 100%;
    background: #141a24;
    border-radius: 40px 40px 28px 28px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.7);
    overflow: hidden;
    border: 1px solid #2c3a4b;
}

/* ===== HEADER ===== */
.app-header {
    background: #1f2a36;
    padding: 18px 20px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #2e3d4e;
}

.app-header h1 {
    font-size: 18px;
    font-weight: 700;
    color: #f0e9d8;
}

.app-header h1 i {
    color: #d4af37;
    margin-right: 8px;
}

.header-badge {
    background: #2c3d50;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    color: #b9c8d9;
    border: 1px solid #3f5368;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    padding: 16px 14px 10px;
    background: #0f151e;
}

/* ===== EVENT TABS ===== */
.event-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 14px;
    scrollbar-width: thin;
    scrollbar-color: #d4af37 #1f2a36;
}

.event-tabs::-webkit-scrollbar {
    height: 4px;
}
.event-tabs::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 10px;
}

.event-tab {
    background: #1e2937;
    padding: 8px 18px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    color: #a6b9ce;
    white-space: nowrap;
    border: 1px solid #2c3d50;
    transition: 0.2s;
    cursor: pointer;
    text-decoration: none;
}

.event-tab.active {
    background: #d4af37;
    color: #0b0e14;
    border-color: #d4af37;
}

.event-tab i {
    margin-right: 6px;
}

/* ===== INVITATION CARD ===== */
.invitation-card {
    background: linear-gradient(145deg, #1f2a36, #16202b);
    border-radius: 28px;
    padding: 20px 18px 18px;
    margin-bottom: 20px;
    border: 1px solid #2f4053;
    box-shadow: 0 6px 0 #0a0e14;
}

.card-title {
    font-size: 20px;
    font-weight: 800;
    color: #f5eddc;
    line-height: 1.2;
}

.card-title span {
    color: #d4af37;
}

.card-sub {
    font-size: 13px;
    color: #b0c4db;
    margin: 6px 0 8px;
}

.event-detail {
    font-size: 13px;
    color: #c6d4e5;
    margin: 10px 0 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
}

.event-detail i {
    color: #d4af37;
    width: 18px;
}

.rules {
    background: #101a24;
    padding: 12px 14px;
    border-radius: 18px;
    margin: 12px 0 10px;
    border-left: 4px solid #d4af37;
}

.rules p {
    font-size: 12px;
    color: #ccdae9;
    margin: 3px 0;
}

.rules i {
    color: #d4af37;
    margin-right: 8px;
    width: 16px;
}

/* ===== QR SECTION ===== */
.qr-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0d131d;
    border-radius: 60px;
    padding: 6px 12px 6px 18px;
    margin: 14px 0 6px;
    border: 1px solid #33485e;
}

.qr-code-box {
    background: white;
    padding: 6px;
    border-radius: 40px;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-code-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-code-box i {
    font-size: 48px;
    color: #0b0e14;
}

.qr-text {
    color: #e9eef5;
    font-weight: 600;
    font-size: 13px;
    flex: 1;
    margin-left: 8px;
}

.qr-text small {
    display: block;
    font-weight: 400;
    color: #9bb0c9;
    font-size: 11px;
}

.qr-badge {
    background: #d4af37;
    padding: 6px 12px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 12px;
    color: #0b0e14;
    cursor: pointer;
}

/* ===== GUEST FORM ===== */
.guest-form {
    background: #1a2532;
    border-radius: 30px;
    padding: 16px 16px 10px;
    margin: 16px 0 10px;
    border: 1px solid #2f4258;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #0d141e;
    border-radius: 60px;
    padding: 4px 14px 4px 16px;
    margin-bottom: 10px;
    border: 1px solid #2b3d52;
}

.input-group i {
    color: #d4af37;
    width: 18px;
    font-size: 14px;
}

.input-group input,
.input-group select {
    background: transparent;
    border: none;
    padding: 12px 0;
    color: #f0f4fc;
    font-size: 14px;
    width: 100%;
    outline: none;
}

.input-group input::placeholder {
    color: #6f849e;
}

.photo-upload {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0 4px;
}

.photo-upload label {
    background: #2c3f54;
    padding: 8px 18px;
    border-radius: 60px;
    font-size: 12px;
    font-weight: 600;
    color: #e0eaf5;
    border: 1px solid #435a73;
    cursor: pointer;
}

.photo-upload i {
    color: #d4af37;
}

/* ===== BUTTONS ===== */
.btn-gold {
    background: #d4af37;
    border: none;
    padding: 14px 0;
    border-radius: 60px;
    font-weight: 700;
    font-size: 16px;
    color: #0b0e14;
    width: 100%;
    margin: 6px 0 8px;
    transition: 0.2s;
    box-shadow: 0 4px 0 #9e8027;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.btn-gold:active {
    transform: scale(0.97);
    box-shadow: 0 1px 0 #9e8027;
}

.btn-secondary {
    background: #293b4e;
    border: none;
    padding: 12px 0;
    border-radius: 60px;
    font-weight: 600;
    font-size: 14px;
    color: #d4e2f5;
    width: 100%;
    margin: 6px 0;
    border: 1px solid #40576e;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #34495e;
}

.btn-danger {
    background: #8f4a3a;
    border: none;
    padding: 12px 0;
    border-radius: 60px;
    font-weight: 600;
    font-size: 14px;
    color: #ffd9c7;
    width: 100%;
    margin: 6px 0;
    border: 1px solid #b35353;
    cursor: pointer;
}

.btn-danger:hover {
    background: #a55a4a;
}

/* ===== ROLE TOGGLE ===== */
.role-toggle {
    display: flex;
    background: #111b26;
    border-radius: 60px;
    padding: 4px;
    margin: 12px 0 8px;
    border: 1px solid #283a4d;
}

.role-toggle button {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 0;
    border-radius: 40px;
    font-weight: 700;
    font-size: 14px;
    color: #8ba1ba;
    transition: 0.2s;
    cursor: pointer;
}

.role-toggle button.active-role {
    background: #d4af37;
    color: #0b0e14;
}

.role-toggle button i {
    margin-right: 6px;
}

/* ===== SCAN RESULT ===== */
.scan-result {
    background: #101b27;
    border-radius: 24px;
    padding: 12px 14px;
    margin: 12px 0 6px;
    border: 1px solid #2e435b;
}

.guest-data {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 48px;
    height: 48px;
    background: #1f3346;
    border-radius: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #d4af37;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar i {
    font-size: 24px;
    color: #d4af37;
}

.info h4 {
    color: #f0f4fc;
    font-size: 15px;
}

.info p {
    color: #a3b9d1;
    font-size: 12px;
}

.status-badge {
    margin-left: auto;
    background: #2d4d3b;
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 11px;
    font-weight: 700;
    color: #b9f0d0;
}

.status-badge.warning {
    background: #8f4a3a;
    color: #ffd9c7;
}

/* ===== ALERT SCAM ===== */
.alert-scam {
    background: #681f1f;
    color: #ffc9c9;
    padding: 12px 14px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 13px;
    border: 1px solid #b35353;
    margin: 10px 0;
}

.alert-scam i {
    margin-right: 8px;
}

/* ===== ADMIN PANEL ===== */
#adminPanel {
    margin-top: 8px;
}

/* ===== GUEST LIST (Dashboard) ===== */
.guest-list {
    background: #1a2532;
    border-radius: 20px;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #2f4258;
    max-height: 300px;
    overflow-y: auto;
}

.guest-list::-webkit-scrollbar {
    width: 4px;
}
.guest-list::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 10px;
}

.guest-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #2f4258;
}

.guest-item:last-child {
    border-bottom: none;
}

.guest-item .guest-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.guest-item .guest-info .avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1f3346;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.guest-item .guest-info .avatar-sm img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.guest-item .guest-info .avatar-sm i {
    color: #d4af37;
    font-size: 14px;
}

.guest-item .guest-info .name {
    color: #f0f4fc;
    font-size: 14px;
    font-weight: 600;
}

.guest-item .guest-info .mobile {
    color: #a3b9d1;
    font-size: 12px;
}

.guest-item .guest-status {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.guest-item .guest-status.entered {
    background: #2d4d3b;
    color: #b9f0d0;
}

.guest-item .guest-status.pending {
    background: #8f7a3a;
    color: #f0e9d8;
}

.guest-item .guest-status.scam {
    background: #681f1f;
    color: #ffc9c9;
}

/* ===== FOOTER ===== */
.app-footer {
    background: #111b26;
    padding: 12px 20px 16px;
    display: flex;
    justify-content: space-around;
    border-top: 1px solid #253645;
    margin-top: 10px;
}

.app-footer a {
    color: #5f7893;
    font-size: 22px;
    transition: 0.2s;
    text-decoration: none;
}

.app-footer a.active-footer {
    color: #d4af37;
}

.app-footer a:hover {
    color: #d4af37;
}

/* ===== LOGIN PAGE ===== */
.login-container {
    max-width: 400px;
    width: 100%;
    background: #141a24;
    border-radius: 40px;
    padding: 40px 30px;
    border: 1px solid #2c3a4b;
    box-shadow: 0 20px 40px rgba(0,0,0,0.7);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #f0e9d8;
    font-size: 28px;
}

.login-header h1 i {
    color: #d4af37;
}

.login-header p {
    color: #8ba1ba;
    margin-top: 8px;
}

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

.form-group label {
    color: #b9c8d9;
    font-size: 13px;
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    background: #0d141e;
    border: 1px solid #2b3d52;
    border-radius: 60px;
    color: #f0f4fc;
    font-size: 14px;
    outline: none;
}

.form-group input:focus {
    border-color: #d4af37;
}

.alert-error {
    background: #681f1f;
    color: #ffc9c9;
    padding: 12px 16px;
    border-radius: 40px;
    font-size: 13px;
    margin-bottom: 16px;
}

.alert-error i {
    margin-right: 8px;
}

/* ===== NOTIFICATION ===== */
#notification {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 60px;
    font-weight: 600;
    font-size: 14px;
    z-index: 1000;
    max-width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: none;
}

/* ============================================================ */
/* ===== ADMIN PANEL CARD VIEWS ===== */
/* ============================================================ */

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.stat-card {
    background: linear-gradient(145deg, #1a2532, #16202b);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    border: 1px solid #2f4258;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.stat-card .number {
    font-size: 28px;
    font-weight: 700;
    color: #d4af37;
    display: block;
}

.stat-card .label {
    font-size: 11px;
    color: #8ba1ba;
    margin-top: 4px;
}

/* Main Admin Cards */
.admin-card {
    background: linear-gradient(145deg, #1a2532, #16202b);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #2f4258;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.admin-card .card-title {
    color: #f0e9d8;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    border-bottom: 1px solid #2f4258;
    padding-bottom: 10px;
}

.admin-card .card-title i {
    color: #d4af37;
    margin-right: 8px;
}

.admin-card .card-subtitle {
    color: #a3b9d1;
    font-size: 13px;
    margin-bottom: 8px;
}

/* Guard Tags */
.guard-tag {
    background: #1f2a36;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    color: #b9c8d9;
    border: 1px solid #2f4053;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 3px;
    transition: all 0.2s ease;
}

.guard-tag:hover {
    border-color: #d4af37;
    background: #2c3d50;
}

.guard-tag i {
    color: #d4af37;
    font-size: 11px;
}

.guard-tag .active {
    color: #4caf50;
}

.guard-tag .inactive {
    color: #8f7a3a;
}

/* Event Badges */
.badge-count {
    background: #2c3d50;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    color: #b9c8d9;
}

.badge-entered {
    background: #2d4d3b;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    color: #b9f0d0;
}

.badge-scam {
    background: #681f1f;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    color: #ffc9c9;
}

/* Event Header */
.event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
}

.event-header .event-title {
    color: #f0e9d8;
    font-size: 16px;
    font-weight: 600;
}

.event-header .event-meta {
    color: #a3b9d1;
    font-size: 12px;
    margin-top: 4px;
}

.event-header .event-meta i {
    color: #d4af37;
    width: 14px;
}

.event-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* Toggle Button */
.toggle-btn {
    cursor: pointer;
    color: #d4af37;
    font-size: 13px;
    padding: 6px 16px;
    border-radius: 20px;
    background: #1f2a36;
    border: 1px solid #2f4053;
    display: inline-block;
    margin-top: 8px;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    background: #2c3d50;
    border-color: #d4af37;
}

/* Guest List in Admin Card */
.guest-details-hidden {
    display: none;
}

.guest-details-visible {
    display: block;
}

.guest-list-card {
    max-height: 250px;
    overflow-y: auto;
    margin-top: 10px;
}

.guest-list-card::-webkit-scrollbar {
    width: 4px;
}
.guest-list-card::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 10px;
}

/* Guest Item in Admin Card */
.guest-item-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #1f2a36;
}

.guest-item-card:last-child {
    border-bottom: none;
}

.guest-item-card .guest-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.guest-item-card .guest-info .avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1f3346;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid #d4af37;
    flex-shrink: 0;
}

.guest-item-card .guest-info .avatar-sm img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.guest-item-card .guest-info .avatar-sm i {
    color: #d4af37;
    font-size: 16px;
}

.guest-item-card .guest-info .guest-details {
    flex: 1;
}

.guest-item-card .guest-info .guest-details .name {
    color: #f0f4fc;
    font-size: 14px;
    font-weight: 500;
}

.guest-item-card .guest-info .guest-details .mobile {
    color: #a3b9d1;
    font-size: 12px;
}

.guest-item-card .guest-info .guest-details .qr-code {
    color: #6f849e;
    font-size: 10px;
    margin-top: 2px;
}

.guest-item-card .guest-status-sm {
    font-size: 10px;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.guest-item-card .guest-status-sm.entered {
    background: #2d4d3b;
    color: #b9f0d0;
}

.guest-item-card .guest-status-sm.pending {
    background: #8f7a3a;
    color: #f0e9d8;
}

.guest-item-card .guest-status-sm.scam {
    background: #681f1f;
    color: #ffc9c9;
}

.guest-item-card .guest-status-sm.not-found {
    background: #3a3a3a;
    color: #8ba1ba;
}

/* Form input fixes inside admin cards */
.admin-card input,
.admin-card select {
    background: #0d141e !important;
    border: 1px solid #2b3d52 !important;
    border-radius: 60px !important;
    padding: 12px 18px !important;
    color: #f0f4fc !important;
    font-size: 14px !important;
    width: 100% !important;
    outline: none !important;
}

.admin-card input::placeholder {
    color: #6f849e !important;
}

.admin-card select option {
    background: #141a24 !important;
    color: #f0f4fc !important;
}

.admin-card .input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #0d141e;
    border-radius: 60px;
    padding: 4px 14px 4px 16px;
    margin-bottom: 10px;
    border: 1px solid #2b3d52;
}

.admin-card .input-group i {
    color: #d4af37;
    width: 18px;
    font-size: 14px;
}

.admin-card .input-group input,
.admin-card .input-group select {
    background: transparent !important;
    border: none !important;
    padding: 12px 0 !important;
    color: #f0f4fc !important;
    font-size: 14px !important;
    width: 100% !important;
    outline: none !important;
}

.admin-card .input-group input::placeholder {
    color: #6f849e !important;
}

/* ===== HELPERS ===== */
.hidden {
    display: none !important;
}

.text-gold {
    color: #d4af37;
}

.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 12px; }
.mb-1 { margin-bottom: 6px; }
.mb-2 { margin-bottom: 12px; }

.flex {
    display: flex;
    align-items: center;
    gap: 8px;
}

.text-center {
    text-align: center;
}

.w-100 {
    width: 100%;
}

/* ============================================================ */
/* ===== RESPONSIVE ===== */
/* ============================================================ */

@media (max-width: 480px) {
    .app-container {
        border-radius: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .event-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .event-badges {
        margin-top: 4px;
    }
    
    .guard-list {
        flex-direction: column;
    }
    
    .guest-item-card {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .guest-item-card .guest-status-sm {
        margin-left: 46px;
    }
    
    .admin-card {
        padding: 12px;
    }
}

@media (max-width: 360px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .stat-card .number {
        font-size: 22px;
    }
    
    .event-header .event-title {
        font-size: 14px;
    }
    
    .event-header .event-meta {
        font-size: 11px;
    }
}