/**
 * Copyright (c) 2026-2060, Arya Wiramukti Reksakembara. Alright Reserved
 *
 * Sistem QR Code Generator - AZSIndo
 * Desain Modern, Elegan, Bersih, dan Profesional
 * Palet Warna Terstandarisasi & Konsisten Lintas Semua Browser & Platform
 * 
 * All innovation copyright (c) 2026 AZSIndo
 */

/* ========================================================
   1. COLOR PALETTE DEFINITIONS & CROSS-BROWSER DESIGN SYSTEM
   ======================================================== */
:root {
    /* Mencegah pemaksaan pembalikan warna (Dark Mode Inversion) otomatis pada browser mobile */
    color-scheme: light;

    /* PALET UTAMA (Primary Gradient & AZSIndo Brand Identity) */
    --color-primary: #764ba2;
    --color-primary-hover: #63398b;
    --color-primary-active: #532c77;
    --color-primary-light: #f3e8ff;
    --color-primary-focus: rgba(118, 75, 162, 0.16);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow-primary: 0 4px 15px rgba(118, 75, 162, 0.35);
    --shadow-primary-hover: 0 6px 22px rgba(118, 75, 162, 0.55);

    /* IDENTITAS RESMI AZSIndo (AZSIndo Maroon) */
    --color-maroon: #800000;
    --color-maroon-hover: #660000;
    --color-maroon-light: rgba(128, 0, 0, 0.08);
    --color-maroon-border: rgba(128, 0, 0, 0.16);
    --color-maroon-focus: rgba(128, 0, 0, 0.12);

    /* PALET SUKSES / UNDUH (Emerald Green) */
    --color-success: #10b981;
    --color-success-hover: #059669;
    --color-success-light: #ecfdf5;
    --color-success-border: #a7f3d0;
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --shadow-success: 0 4px 14px rgba(16, 185, 129, 0.35);
    --shadow-success-hover: 0 6px 20px rgba(16, 185, 129, 0.5);

    /* PALET AKSI (Buat Baru - Indigo / Violet) */
    --color-action: #6366f1;
    --color-action-hover: #4f46e5;
    --gradient-action: linear-gradient(135deg, #6366f1 0%, #764ba2 100%);
    --shadow-action: 0 4px 15px rgba(99, 102, 241, 0.4);
    --shadow-action-hover: 0 6px 22px rgba(99, 102, 241, 0.6);

    /* PALET PERINGATAN / ERROR (Alert Red) */
    --color-danger: #ef4444;
    --color-danger-text: #991b1b;
    --color-danger-bg: #fee2e2;
    --color-danger-border: #f87171;

    /* PALET PERMUKAAN & NETRAL (Slate Neutral - Standar sRGB) */
    --bg-page-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-card: #ffffff;
    --bg-input: #f8fafc;
    --bg-input-hover: #ffffff;
    --bg-input-focus: #ffffff;
    --bg-muted: #f1f5f9;
    --bg-subtle: #f8fafc;

    --text-primary: #1e293b;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-placeholder: #94a3b8;
    --text-white: #ffffff;

    --border-light: #e2e8f0;
    --border-input: #cbd5e1;
    --border-hover: #94a3b8;
    --border-focus: #764ba2;

    /* BAYANGAN & ELEVASI */
    --shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 10px 20px -5px rgba(0, 0, 0, 0.1);
    --shadow-preview: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* ========================================================
   2. GLOBAL RESET & CROSS-PLATFORM FONT NORMALIZATION
   ======================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    color-scheme: light;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    background: var(--bg-page-gradient);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    -webkit-tap-highlight-color: transparent;
}

::selection {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

/* ========================================================
   3. CONTAINER UTAMA (CARD)
   ======================================================== */
.container {
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: 28px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.65);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* ========================================================
   4. HEADER KONSISTEN
   ======================================================== */
.header {
    background: var(--gradient-primary);
    padding: 28px 24px 26px;
    text-align: center;
    color: var(--text-white);
    position: relative;
}

.header-logo {
    max-width: 78px;
    height: auto;
    margin-bottom: 14px;
    border-radius: 18px;
    background: var(--bg-card);
    padding: 8px 10px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    display: inline-block;
}

.header h1 {
    color: var(--text-white);
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0 0 6px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.header p {
    color: rgba(255, 255, 255, 0.94);
    font-size: 0.88rem;
    line-height: 1.5;
    margin: 0 auto;
    max-width: 440px;
    font-weight: 500;
}

/* ========================================================
   5. FORM WRAPPER & ELEMEN INPUT KONSISTEN
   ======================================================== */
.form-wrapper {
    padding: 28px 24px 24px;
    background: var(--bg-card);
}

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

label {
    display: block;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 0.9rem;
    letter-spacing: -0.2px;
}

/* Normalisasi Input Textbox untuk Safari, iOS, Chrome, Firefox, Edge */
select, 
input[type="text"], 
input[type="email"],
input[type="password"],
input[type="number"],
textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    padding: 13px 16px;
    background: var(--bg-input);
    border: 1.5px solid var(--border-input);
    border-radius: 14px;
    font-size: 16px; /* 16px mencegah auto-zoom paksa pada iOS Safari */
    color: var(--text-primary);
    font-family: inherit;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    box-shadow: none;
}

/* Placeholder konsisten */
input::placeholder,
textarea::placeholder {
    color: var(--text-placeholder);
    font-weight: 400;
    opacity: 1;
}

select:hover, 
input[type="text"]:hover, 
input[type="email"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
textarea:hover {
    background: var(--bg-input-hover);
    border-color: var(--border-hover);
}

select:focus, 
input[type="text"]:focus, 
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus {
    outline: none;
    background: var(--bg-input-focus);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-focus);
}

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 42px;
}

/* ========================================================
   6. UPLOAD LOGO
   ======================================================== */
.file-label {
    background: var(--bg-input);
    border: 2px dashed var(--border-input);
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    user-select: none;
}

.file-label:hover {
    background: var(--bg-muted);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

input[type="file"] {
    display: none;
}

.file-name {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 6px;
    word-break: break-all;
    font-weight: 500;
}

/* ========================================================
   7. SISTEM PALET WARNA KUSTOM (SOLID & GRADIEN 3 WARNA)
   Desain Mandiri & Konsisten Lintas Semua Platform & Browser
   ======================================================== */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.checkbox-label input[type="checkbox"] {
    width: 19px;
    height: 19px;
    accent-color: var(--color-primary);
    cursor: pointer;
    margin: 0;
    border-radius: 4px;
}

.custom-palette-card {
    background: var(--bg-input);
    border: 1.5px solid var(--border-light);
    border-radius: 18px;
    padding: 16px;
    margin-top: 14px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.custom-palette-card:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-focus);
}

.custom-palette-header {
    margin-bottom: 12px;
}

.palette-subtext {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
    line-height: 1.4;
}

/* Kontrol Tampilan Warna Aktif & Hex Field */
.palette-active-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--bg-card);
    border: 1.5px solid var(--border-input);
    border-radius: 14px;
    padding: 10px 14px;
    box-sizing: border-box;
    box-shadow: var(--shadow-sm);
    margin-bottom: 14px;
}

.palette-preview-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.palette-swatch-large {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    border: 1.5px solid rgba(0, 0, 0, 0.15);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), 0 2px 5px rgba(0, 0, 0, 0.08);
    display: inline-block;
    transition: transform 0.15s ease, background-color 0.2s ease;
}

.palette-info-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.palette-active-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.palette-active-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.palette-hex-group {
    display: inline-flex;
    align-items: center;
    background: var(--bg-muted);
    border: 1.5px solid var(--border-input);
    border-radius: 10px;
    padding: 2px 8px;
    height: 36px;
    box-sizing: border-box;
}

.palette-hex-prefix {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-right: 2px;
    user-select: none;
}

.palette-hex-field {
    width: 72px;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: none !important;
    outline: none !important;
    height: auto !important;
}

.palette-section-title {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Grid Swatches Pilihan Warna (Konsisten di Safari, iOS, Chrome, Android, Firefox, Windows, Mac) */
.custom-swatches-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.custom-swatch-btn {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    cursor: pointer;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.custom-swatch-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
    z-index: 2;
    border-color: #ffffff;
}

.custom-swatch-btn.active {
    box-shadow: 0 0 0 2.5px #ffffff, 0 0 0 4.5px var(--color-primary);
    transform: scale(1.08);
    z-index: 3;
    border-color: #ffffff;
}

.custom-swatch-btn .swatch-check {
    display: none;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.custom-swatch-btn.active .swatch-check {
    display: block;
}

/* Tuning Area (Slider Custom) */
.palette-tuning-area {
    margin-top: 10px;
    border-top: 1px dashed var(--border-light);
    padding-top: 8px;
}

.btn-palette-tuning {
    background: none;
    border: none;
    width: 100%;
    padding: 6px 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
    box-shadow: none;
    border-radius: 8px;
    margin: 0;
    font-family: inherit;
}

.btn-palette-tuning:hover {
    background: rgba(118, 75, 162, 0.06);
}

.tuning-arrow {
    transition: transform 0.2s ease;
    font-size: 0.75rem;
}

.tuning-arrow.rotated {
    transform: rotate(180deg);
}

.palette-tuning-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 12px 14px;
    margin-top: 8px;
    box-shadow: var(--shadow-sm);
}

.tuning-row {
    margin-bottom: 8px;
}

.tuning-row:last-child {
    margin-bottom: 0;
}

.tuning-row-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

/* Custom Range Sliders */
.custom-hue-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
    outline: none;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    margin: 0;
}

.custom-hue-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid var(--text-primary);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.custom-hue-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid var(--text-primary);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.custom-shade-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(to right, #000000 0%, #475569 50%, #94a3b8 100%);
    outline: none;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    margin: 0;
}

.custom-shade-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid var(--text-primary);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.custom-shade-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid var(--text-primary);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

/* ================= GRADIEN 3 WARNA ELEMEN ================= */
.gradient-live-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border-light);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}

.gradient-live-bar {
    width: 100%;
    height: 28px;
    border-radius: 8px;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: background 0.25s ease;
}

.gradient-live-badges {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    margin-top: 8px;
}

.grad-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.74rem;
    color: var(--text-secondary);
    background: var(--bg-muted);
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.badge-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

/* Grid Preset Gradien 1-Klik */
.gradient-presets-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.grad-preset-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border-input);
    border-radius: 10px;
    padding: 6px 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    box-shadow: var(--shadow-sm);
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
}

.grad-preset-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.grad-preset-card.active {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
    box-shadow: 0 0 0 2px var(--color-primary-focus);
}

.grad-preset-preview {
    width: 100%;
    height: 12px;
    border-radius: 4px;
    display: block;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.grad-preset-name {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Tab Step Pemilihan Gradien */
.gradient-step-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.grad-step-btn {
    flex: 1;
    background: var(--bg-card);
    border: 1.5px solid var(--border-input);
    border-radius: 10px;
    padding: 8px 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
}

.grad-step-btn:hover {
    background: var(--bg-muted);
    border-color: var(--border-hover);
}

.grad-step-btn.active {
    background: #ffffff;
    border-color: var(--color-primary);
    color: var(--color-primary);
    font-weight: 700;
    box-shadow: 0 0 0 2px var(--color-primary-focus);
}

.grad-step-swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.gradient-active-editor {
    background: var(--bg-card);
    border: 1.5px solid var(--border-light);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
}

/* ========================================================
   8. WIDGET VERIFIKASI SAYA MANUSIA (I'M HUMAN & ANTI-BOT)
   AZSIndo
   ======================================================== */
.admin-human-box {
    background: var(--bg-input) !important;
    border: 1.5px solid var(--border-light) !important;
    border-radius: 16px !important;
    padding: 14px 16px !important;
    margin-top: 18px !important;
    margin-bottom: 22px !important;
    box-shadow: var(--shadow-sm) !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    transition: border-color 0.25s ease, box-shadow 0.25s ease !important;
}

.admin-human-box * {
    box-sizing: border-box !important;
}

.admin-human-box:focus-within {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px var(--color-primary-focus) !important;
}

.admin-human-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid var(--border-light) !important;
    flex-wrap: nowrap !important;
    line-height: 1.25 !important;
    width: 100% !important;
}

.admin-human-title {
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.admin-human-title i {
    color: var(--color-success) !important;
    font-size: 0.95rem !important;
    flex-shrink: 0 !important;
}

.admin-human-title strong {
    font-weight: 700 !important;
    color: var(--text-primary) !important;
}

.admin-human-en {
    font-size: 0.78rem !important;
    color: var(--text-muted) !important;
    font-weight: 500 !important;
    margin-left: 2px !important;
    white-space: nowrap !important;
}

.admin-human-tag {
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.2px !important;
    color: var(--color-maroon) !important;
    background: var(--color-maroon-light) !important;
    border: 1px solid var(--color-maroon-border) !important;
    padding: 3px 8px !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.admin-human-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-wrap: nowrap !important;
}

.admin-human-svg-wrap {
    width: 130px !important;
    min-width: 130px !important;
    max-width: 130px !important;
    height: 42px !important;
    flex: 0 0 130px !important;
    background: var(--bg-card) !important;
    border: 1.5px solid var(--border-input) !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    margin: 0 !important;
    padding: 0 !important;
}

.admin-human-svg-wrap svg {
    width: 130px !important;
    height: 38px !important;
    display: block !important;
    max-width: 100% !important;
}

.admin-human-refresh {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: 42px !important;
    flex: 0 0 42px !important;
    background: var(--bg-card) !important;
    border: 1.5px solid var(--border-input) !important;
    color: var(--text-secondary) !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.95rem !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    box-shadow: var(--shadow-sm) !important;
    -webkit-appearance: none;
    appearance: none;
}

.admin-human-refresh:hover {
    background: var(--color-maroon) !important;
    border-color: var(--color-maroon) !important;
    color: var(--text-white) !important;
    transform: translateY(-1px) !important;
}

.admin-human-refresh.rotating svg,
.admin-human-refresh.rotating i {
    animation: humanSpin 0.6s linear infinite !important;
}

@keyframes humanSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.admin-human-input {
    flex: 1 1 0% !important;
    min-width: 75px !important;
    width: 100% !important;
    height: 42px !important;
    text-align: center !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    letter-spacing: 1px !important;
    border-radius: 10px !important;
    border: 1.5px solid var(--border-input) !important;
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
    padding: 0 10px !important;
    margin: 0 !important;
    display: block !important;
    transition: all 0.2s ease !important;
    -webkit-appearance: none;
    appearance: none;
}

.admin-human-input::placeholder {
    font-weight: 400 !important;
    font-size: 0.85rem !important;
    letter-spacing: normal !important;
    color: var(--text-placeholder) !important;
}

.admin-human-input:focus {
    outline: none !important;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px var(--color-primary-focus) !important;
}

.admin-human-hint {
    font-size: 0.76rem !important;
    color: var(--text-muted) !important;
    margin-top: 8px !important;
    margin-bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    line-height: 1.35 !important;
}

.admin-human-hint i {
    color: var(--color-maroon) !important;
    font-size: 0.82rem !important;
    flex-shrink: 0 !important;
}

/* ========================================================
   9. TOMBOL UTAMA & AKSI GENERATOR
   ======================================================== */
button[type="submit"] {
    background: var(--gradient-primary);
    color: var(--text-white);
    border: none;
    padding: 16px 24px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    width: 100%;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-primary);
    margin-top: 10px;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}

button[type="submit"]:hover {
    box-shadow: var(--shadow-primary-hover);
    transform: translateY(-2px);
}

button[type="submit"]:active {
    transform: translateY(0);
}

/* ========================================================
   10. HASIL QR CODE & TOMBOL UNDUH / BUAT BARU
   ======================================================== */
.result {
    margin-top: 26px;
    padding: 22px;
    background: var(--bg-input);
    border-radius: 20px;
    border: 1.5px solid var(--border-light);
    text-align: center;
    animation: fadeIn 0.35s ease;
}

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

.qr-preview {
    background: var(--bg-card);
    padding: 16px;
    border-radius: 20px;
    box-shadow: var(--shadow-preview);
    display: inline-block;
    max-width: 100%;
}

.qr-preview img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    margin: 0 auto;
}

.download-area {
    margin-top: 18px;
}

.download-btn {
    background: var(--gradient-success);
    color: var(--text-white);
    border: none;
    padding: 16px 24px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    width: 100%;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-success);
}

.download-btn:hover {
    box-shadow: var(--shadow-success-hover);
    transform: translateY(-2px);
    color: var(--text-white);
}

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

.btn-new {
    background: var(--gradient-action);
    color: var(--text-white);
    border: none;
    padding: 15px 24px;
    font-size: 1.02rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    width: 100%;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-action);
    margin-top: 12px;
}

.btn-new:hover {
    box-shadow: var(--shadow-action-hover);
    transform: translateY(-2px);
    color: var(--text-white);
}

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

/* ========================================================
   11. NOTIFIKASI ERROR / PESAN
   ======================================================== */
.error {
    background: var(--color-danger-bg);
    color: var(--color-danger-text);
    padding: 13px 16px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-left: 4px solid var(--color-danger);
    box-shadow: var(--shadow-sm);
}

.info-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 5px;
    line-height: 1.4;
}

/* ========================================================
   12. FOOTER KONSISTEN
   ======================================================== */
.page-footer {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 16px 20px 20px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-card);
    line-height: 1.6;
}

.page-footer a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.page-footer a:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

/* ========================================================
   13. MODAL SLIDE CAROUSEL
   ======================================================== */
.modal-slide {
    display: none;
    position: fixed;
    z-index: 99999;
    inset: 0;
    background-color: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-slide.show {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    border-radius: 24px;
    padding: 24px;
    text-align: center;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-content img {
    max-width: 100%;
    max-height: 60vh;
    border-radius: 16px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.slide-caption {
    margin-top: 14px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.close-modal {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 30px;
    cursor: pointer;
    color: var(--text-placeholder);
    background: none;
    border: none;
    line-height: 1;
    transition: color 0.15s ease;
    z-index: 10;
}

.close-modal:hover {
    color: var(--text-primary);
}

.slide-dots {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    background: var(--border-input);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dot.active {
    background: var(--color-primary);
    width: 24px;
    border-radius: 20px;
}

/* ========================================================
   14. RESPONSIVE DESIGN (MOBILE & SMALL SCREENS)
   ======================================================== */
@media (max-width: 480px) {
    body {
        padding: 12px;
    }
    .container {
        border-radius: 22px;
    }
    .header {
        padding: 22px 18px;
    }
    .header h1 {
        font-size: 1.5rem;
    }
    .form-wrapper {
        padding: 20px 16px;
    }
    button[type="submit"], 
    .download-btn,
    .btn-new {
        padding: 14px 18px;
        font-size: 1rem;
    }
    .gradient-colors {
        grid-template-columns: 1fr;
    }
    .header-logo {
        max-width: 65px;
    }
}

@media (max-width: 440px) {
    .admin-human-en { display: none !important; }
}

@media (max-width: 360px) {
    .admin-human-prefix { display: none !important; }
    .admin-human-svg-wrap {
        width: 110px !important;
        min-width: 110px !important;
        max-width: 110px !important;
        flex: 0 0 110px !important;
    }
}
