/*
=========================================
==         GLOBAL & FONT STYLES        ==
=========================================
*/
:root {
    --primary-color: #004AAD;
    --primary-hover: #003B80;
    --secondary-color: #FDB913;
    --background-color: #f4f7f6;
    --text-color: #333333;
    --card-bg: #ffffff;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/*
=========================================
==         MODERN HEADER STYLES        ==
=========================================
*/
.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    margin-bottom: 35px;
    padding: 25px 20px 20px 20px;
    position: relative;
    border-bottom: none;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(0, 74, 173, 0.08), rgba(253, 185, 19, 0.15));
    border: 1px solid rgba(0, 74, 173, 0.2);
    color: var(--primary-color);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 6px 16px;
    border-radius: 50px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 74, 173, 0.06);
}

.header-badge i {
    color: var(--secondary-color);
    font-size: 0.95rem;
}

.brand-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 4px;
}

.brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), #002e6b);
    color: #ffffff;
    border-radius: 14px;
    font-size: 1.5rem;
    box-shadow: 0 6px 16px rgba(0, 74, 173, 0.3);
    transition: transform 0.3s ease;
}

.header:hover .brand-icon {
    transform: rotate(-6deg) scale(1.06);
}

.header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    line-height: 1.15;
}

.header h1 span {
    background: linear-gradient(135deg, #004AAD, #0077ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--primary-color);
    position: relative;
}

.header h1 span::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
    opacity: 0.8;
}

.header-subtitle {
    margin: 4px 0 0 0;
    color: #64748b;
    font-size: 0.98rem;
    font-weight: 500;
    max-width: 500px;
}

.header::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
    margin-top: 14px;
}

/*
=========================================
==             MAIN LAYOUT             ==
=========================================
*/
.main-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
}

.canvas-area {
    position: sticky;
    top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    min-height: 480px;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.canvas-container {
    margin: 0 auto !important;
    max-width: 100% !important;
    position: relative !important;
}

#twibbon-canvas { 
    border-radius: 8px; 
    box-shadow: 0 0 10px rgba(0,0,0,0.1); 
}

/* Placeholder Box di Tengah Kanvas */
#canvas-placeholder {
    text-align: center;
    color: #64748b;
    position: absolute;
    z-index: 5;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    padding: 24px 28px;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(0, 74, 173, 0.08);
    border: 1px solid rgba(0, 74, 173, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#canvas-placeholder .placeholder-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(0, 74, 173, 0.1), rgba(253, 185, 19, 0.2));
    border-radius: 16px;
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 12px;
}

#canvas-placeholder p {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.4;
}

/*
==================================================
== DESAIN COLLAPSE & MINIMIZE PANEL (STEP CARDS)==
==================================================
*/
.controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.step-card {
    background-color: var(--card-bg); 
    padding: 16px 20px;
    border-radius: 12px; 
    box-shadow: var(--shadow);
    border: 1px solid #e0e0e0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.35s ease-in-out;
}

.step-card.minimized {
    padding-bottom: 16px;
    background-color: #fafbfc;
}

.card-header-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    padding: 2px 0;
}

.card-header-toggle h3 { 
    margin: 0; 
    color: var(--primary-color); 
    font-size: 1.12em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-icon {
    font-size: 1.15rem;
    color: #64748b;
    transition: transform 0.25s ease, color 0.25s ease;
}

.card-header-toggle:hover .toggle-icon {
    color: var(--primary-color);
}

.card-collapsible-body {
    margin-top: 14px;
    border-top: 1px solid #f1f5f9;
    padding-top: 14px;
    transition: all 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/*
==================================================
== DESAIN TOMBOL NOMOR MODEL BINGKAI            ==
==================================================
*/
.section-hint {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 12px;
}

.frame-number-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(65px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.btn-frame-number {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 8px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.btn-frame-number .number-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: #f0f4f8;
    color: var(--primary-color);
    font-size: 1.3em;
    font-weight: 800;
    transition: all 0.25s ease;
}

.btn-frame-number .number-label {
    font-size: 0.78em;
    font-weight: 600;
    color: #666;
    transition: color 0.25s ease;
}

.btn-frame-number:hover {
    border-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(253, 185, 19, 0.25);
}

.btn-frame-number.active {
    border-color: var(--primary-color);
    background: linear-gradient(145deg, #004AAD, #003B80);
    box-shadow: 0 6px 16px rgba(0, 74, 173, 0.35);
    transform: translateY(-2px);
}

.btn-frame-number.active .number-badge {
    background-color: var(--secondary-color);
    color: #003B80;
    transform: scale(1.08);
}

.btn-frame-number.active .number-label {
    color: #ffffff;
}

/*
==================================================
== TOMBOL HAPUS BACKGROUND (AI) & WARNA BG      ==
==================================================
*/
.btn-ai-remove-bg {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    margin-top: 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #d946ef);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
    transition: all 0.25s ease;
}

.btn-ai-remove-bg:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.45);
}

.btn-ai-remove-bg:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ai-loading {
    margin-top: 8px;
    font-size: 0.85em;
    font-weight: 600;
    color: #6366f1;
    text-align: center;
}

.spinner-border {
    display: inline-block;
    width: 14px;
    height: 14px;
    vertical-align: -2px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

.bg-color-container {
    margin-top: 14px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.bg-color-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.bg-color-options {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.color-preset-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.color-preset-btn i {
    font-size: 1rem;
    color: #64748b;
}

.color-preset-btn:hover {
    transform: scale(1.15);
}

.color-preset-btn.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--primary-color);
    transform: scale(1.1);
}

.custom-color-wrapper {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px dashed #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.2s ease;
}

.custom-color-wrapper i {
    font-size: 0.9rem;
    color: #475569;
    pointer-events: none;
}

.custom-color-wrapper input[type="color"] {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 50px;
    height: 50px;
    opacity: 0;
    cursor: pointer;
}

.custom-color-wrapper:hover {
    border-color: var(--primary-color);
    transform: scale(1.1);
}

/*
=========================================
==     FORM, BUTTONS, & UI ELEMENTS    ==
=========================================
*/
.form-group { margin-bottom: 12px; }
.form-group label {
    display: block;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 6px;
    color: #444;
}

input[type="text"], select {
    width: 100%; 
    padding: 11px 12px; 
    border-radius: 8px;
    border: 1px solid #ccc; 
    box-sizing: border-box;
    font-family: inherit;
    font-size: 0.95em;
    outline: none;
    color: var(--text-color);
}
input[type="text"]:focus, select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 74, 173, 0.15);
}

input[type="range"] {
    width: 100%;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.btn-primary, .btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%; 
    text-align: center;
    padding: 12px 20px; 
    border-radius: 8px; 
    border: none;
    font-size: 1em; 
    font-weight: 600; 
    cursor: pointer;
    text-decoration: none; 
    box-sizing: border-box; 
    transition: all 0.25s ease;
    font-family: inherit;
}
.btn-primary { 
    background-color: var(--primary-color); 
    color: white; 
}
.btn-primary:hover { 
    background-color: var(--primary-hover); 
}
.btn-secondary { 
    background-color: #f0f0f0; 
    color: #333; 
    border: 1px solid #ddd;
}
.btn-secondary:hover { 
    background-color: #e0e0e0; 
}

.control-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 15px; 
    margin: 12px 0; 
}
.control-grid input[type="color"] {
    width: 100%;
    height: 38px;
    padding: 2px;
    border-radius: 6px;
    border: 1px solid #ccc;
    cursor: pointer;
}

.btn-group { display: flex; gap: 10px; margin-bottom: 12px; }
.style-btn {
    flex: 1; 
    padding: 8px; 
    font-size: 1em; 
    border: 1px solid #ccc;
    background-color: #f0f0f0; 
    border-radius: 6px; 
    cursor: pointer; 
    transition: all 0.2s;
}
.style-btn:hover { background-color: #ddd; }
.style-btn.active { 
    background-color: var(--primary-color); 
    color: white; 
    border-color: var(--primary-color); 
}

/*
=========================================
==          ANIMASI BACKGROUND         ==
=========================================
*/
.background-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}
.bubble {
    position: absolute;
    display: block;
    border-radius: 50%;
    opacity: 0.5;
    background-color: var(--secondary-color);
    animation: float 15s ease-in-out infinite;
}
.bubble:nth-child(even) {
    background-color: var(--primary-color);
    opacity: 0.4;
    animation-duration: 20s;
}
.bubble1 { width: 40px; height: 40px; bottom: -10%; left: 10%; animation-delay: 0s; }
.bubble2 { width: 60px; height: 60px; bottom: -20%; left: 30%; animation-delay: 5s; }
.bubble3 { width: 30px; height: 30px; bottom: -5%; left: 50%; animation-delay: 10s; }
.bubble4 { width: 50px; height: 50px; bottom: -15%; left: 70%; animation-delay: 2s; }
.bubble5 { width: 45px; height: 45px; bottom: -25%; left: 85%; animation-delay: 8s; }

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); opacity: 0.4; }
    50% { transform: translateY(-100%) rotate(180deg); opacity: 0.6; }
    100% { transform: translateY(-200%) rotate(360deg); opacity: 0.4; }
}

/*
=========================================
==        RESPONSIVE MOBILE            ==
=========================================
*/
@media (max-width: 900px) {
    body { padding: 12px 10px; }
    .header { gap: 10px; margin-bottom: 20px; }
    .header .logo { max-width: 180px; }
    .header h1 { font-size: 1.5em; }

    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .canvas-area {
        position: relative; 
        top: 0; 
        min-height: 320px;
        padding: 10px;
    }
}

/*
=====================================================
==        MODERN ADMIN DASHBOARD STYLES            ==
=====================================================
*/
.admin-body {
    background-color: #f1f5f9;
    color: #1e293b;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

.admin-layout-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 24px 20px 60px 20px;
}

/* Topbar Header */
.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    padding: 16px 24px;
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(0, 74, 173, 0.06);
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-brand .brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #004AAD, #002e6b);
    color: #ffffff;
    border-radius: 12px;
    font-size: 1.4rem;
    box-shadow: 0 4px 12px rgba(0, 74, 173, 0.25);
}

.admin-brand .brand-text h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: #004AAD;
    line-height: 1.1;
}

.admin-brand .brand-text h2 span {
    background: linear-gradient(135deg, #004AAD, #0077ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.admin-brand .brand-text small {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-topbar-link, .btn-topbar-secondary, .btn-topbar-danger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-topbar-link {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #cbd5e1;
}
.btn-topbar-link:hover {
    background: #f1f5f9;
    color: #004AAD;
    border-color: #004AAD;
}

.btn-topbar-secondary {
    background: rgba(0, 74, 173, 0.08);
    color: #004AAD;
    border: 1px solid rgba(0, 74, 173, 0.2);
}
.btn-topbar-secondary:hover {
    background: #004AAD;
    color: #ffffff;
}

.btn-topbar-danger {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.btn-topbar-danger:hover {
    background: #dc2626;
    color: #ffffff;
}

/* Welcome Banner */
.admin-welcome-banner {
    background: linear-gradient(135deg, #004AAD 0%, #002e6b 100%);
    color: #ffffff;
    padding: 28px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 74, 173, 0.25);
    margin-bottom: 26px;
    position: relative;
    overflow: hidden;
}

.admin-welcome-banner::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(253, 185, 19, 0.25), transparent 70%);
    pointer-events: none;
}

.welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-welcome-banner h2 {
    margin: 0 0 6px 0;
    font-size: 1.6rem;
    font-weight: 800;
}

.admin-welcome-banner p {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.9;
    max-width: 700px;
    line-height: 1.5;
}

/* Cards Form & Table */
.admin-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 28px 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    margin-bottom: 26px;
}

.card-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.card-heading .heading-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(0, 74, 173, 0.08);
    color: #004AAD;
    border-radius: 12px;
    font-size: 1.4rem;
}

.card-heading h3 {
    margin: 0 0 3px 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
}

.card-heading p {
    margin: 0;
    font-size: 0.88rem;
    color: #64748b;
}

/* Form Styling */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group-modern label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.required-star {
    color: #ef4444;
    font-weight: bold;
}

.form-group-modern input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    font-size: 0.95rem;
    font-family: inherit;
    color: #1e293b;
    outline: none;
    transition: all 0.2s ease;
    background: #f8fafc;
    box-sizing: border-box;
}

.form-group-modern input[type="text"]:focus {
    background: #ffffff;
    border-color: #004AAD;
    box-shadow: 0 0 0 4px rgba(0, 74, 173, 0.12);
}

.slug-status-hint {
    margin-top: 6px;
    font-size: 0.82rem;
}

/* Dropzone Frame Upload Grid */
.frame-upload-section {
    margin-top: 20px;
    margin-bottom: 24px;
    background: #f8fafc;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.frame-section-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #004AAD;
    margin-bottom: 14px;
}

.frame-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.frame-upload-box {
    position: relative;
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    text-align: center;
    transition: all 0.25s ease;
    overflow: hidden;
}

.frame-upload-box:hover {
    border-color: #004AAD;
    background: #f0f7ff;
    transform: translateY(-2px);
}

.frame-upload-box.is-mandatory {
    border-color: rgba(0, 74, 173, 0.4);
    background: #fcfdfe;
}

.frame-upload-box.uploaded {
    border-color: #16a34a;
    border-style: solid;
    background: #f0fdf4;
}

.upload-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 12px;
    cursor: pointer;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.dropzone-icon {
    width: 40px;
    height: 40px;
    background: #f1f5f9;
    color: #004AAD;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.frame-upload-box:hover .dropzone-icon {
    background: #004AAD;
    color: #ffffff;
}

.dropzone-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2px;
}

.dropzone-desc {
    font-size: 0.72rem;
    color: #64748b;
    margin-bottom: 6px;
}

.file-chosen-name {
    font-size: 0.74rem;
    font-weight: 600;
    color: #94a3b8;
    word-break: break-all;
    display: block;
    max-width: 100%;
    padding: 2px 6px;
    border-radius: 4px;
}

.file-chosen-name.has-file {
    color: #16a34a;
    background: #dcfce7;
}

/* Sembunyikan default input file */
.file-upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 5;
}

.btn-submit-event {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #004AAD, #003B80);
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 74, 173, 0.25);
    transition: all 0.2s ease;
}

.btn-submit-event:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 74, 173, 0.35);
}

.btn-submit-event:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Modern Table Responsive */
.table-responsive-wrapper {
    overflow-x: auto;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
}

.admin-modern-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.92rem;
}

.admin-modern-table thead {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.admin-modern-table th {
    padding: 14px 16px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-modern-table td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.admin-modern-table tbody tr:hover {
    background-color: #f8fafc;
}

.event-title-text {
    display: block;
    font-weight: 700;
    color: #0f172a;
    font-size: 1rem;
    margin-bottom: 3px;
}

.event-slug-badge {
    display: inline-block;
    font-size: 0.78rem;
    color: #004AAD;
    background: #e0f2fe;
    padding: 2px 8px;
    border-radius: 6px;
    font-family: monospace;
    font-weight: 600;
}

.copy-url-container {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    max-width: 480px;
}

.url-input-field {
    flex: 1;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    font-size: 0.78rem;
    font-family: monospace;
    background: #f8fafc;
    color: #475569;
    outline: none;
    box-sizing: border-box;
}

.btn-copy-url {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #ffffff;
    color: #004AAD;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy-url:hover {
    background: #004AAD;
    color: #ffffff;
    border-color: #004AAD;
}

.btn-copy-url.copied {
    background: #16a34a;
    color: #ffffff;
    border-color: #16a34a;
}

.creator-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 500;
}

.download-counter-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
}

.table-action-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-table-edit, .btn-table-delete {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-table-edit {
    background: #004AAD;
    color: #ffffff;
}
.btn-table-edit:hover {
    background: #003B80;
    transform: translateY(-1px);
}

.btn-table-delete {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.btn-table-delete:hover {
    background: #dc2626;
    color: #ffffff;
    transform: translateY(-1px);
}

.empty-state-cell {
    text-align: center;
    padding: 45px 20px !important;
    color: #94a3b8;
}

.empty-state-cell i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 8px;
}

.empty-state-cell p {
    margin: 0;
    font-size: 0.92rem;
}

/* Responsif Mobile Admin */
@media (max-width: 900px) {
    .admin-topbar {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .admin-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .form-grid-2 {
        grid-template-columns: 1fr;
    }

    .admin-card {
        padding: 20px 16px;
    }

    .admin-modern-table thead {
        display: none;
    }

    .admin-modern-table, .admin-modern-table tbody, .admin-modern-table tr, .admin-modern-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .admin-modern-table tr {
        background: #ffffff;
        border-bottom: 2px solid #e2e8f0;
        padding: 12px;
        margin-bottom: 12px;
        border-radius: 12px;
    }

    .admin-modern-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid #f1f5f9;
        text-align: right;
    }

    .admin-modern-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #475569;
        font-size: 0.82rem;
        text-transform: uppercase;
        text-align: left;
    }

    .copy-url-container {
        max-width: 100%;
    }
}

/*
=====================================================
==    DESAIN TOMBOL UNDUH MODERN & PROFESIONAL     ==
=====================================================
*/
.download-button-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 8px;
}

.btn-download-action {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    padding: 16px 20px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    text-decoration: none;
}

/* Tombol 1: Unduh Cepat */
.btn-download-action.btn-fast {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.btn-download-action.btn-fast .btn-icon-wrapper {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #d97706;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.btn-download-action.btn-fast .btn-main-title {
    color: #1e293b;
}

.btn-download-action.btn-fast .btn-sub-title {
    color: #64748b;
}

.btn-download-action.btn-fast .btn-arrow-icon {
    color: #94a3b8;
}

.btn-download-action.btn-fast:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.btn-download-action.btn-fast:hover .btn-arrow-icon {
    color: #d97706;
    transform: translateX(4px);
}

/* Tombol 2: Unduh Kualitas HD (Gradient Premium) */
.btn-download-action.btn-hd {
    background: linear-gradient(135deg, #004AAD 0%, #002e6b 100%);
    box-shadow: 0 8px 25px rgba(0, 74, 173, 0.28);
    border: 1.5px solid rgba(253, 185, 19, 0.35);
}

.btn-download-action.btn-hd .btn-icon-wrapper {
    background: rgba(255, 255, 255, 0.15);
    color: #FDB913;
    border: 1px solid rgba(253, 185, 19, 0.4);
    box-shadow: 0 0 15px rgba(253, 185, 19, 0.2);
}

.btn-download-action.btn-hd .btn-main-title {
    color: #ffffff;
}

.btn-download-action.btn-hd .btn-sub-title {
    color: #cbd5e1;
}

.btn-download-action.btn-hd .btn-arrow-icon {
    color: #FDB913;
}

.btn-download-action.btn-hd:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 74, 173, 0.45);
    border-color: #FDB913;
}

.btn-download-action.btn-hd:hover .btn-arrow-icon {
    transform: translateX(4px);
}

/* Elemen Icon & Typography */
.btn-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    font-size: 1.45rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.btn-download-action:hover .btn-icon-wrapper {
    transform: scale(1.08);
}

.btn-info-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 2px;
}

.btn-main-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
}

.btn-sub-title {
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.2;
}

.btn-arrow-icon {
    font-size: 1.6rem;
    transition: transform 0.25s ease, color 0.25s ease;
    flex-shrink: 0;
}

/* Badge Rekomendasi di Tombol HD */
.badge-recommended {
    position: absolute;
    top: 10px;
    right: 14px;
    background: linear-gradient(135deg, #FDB913, #f59e0b);
    color: #002e6b;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 3px 8px;
    border-radius: 50px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/*
=====================================================
==    DESAIN PENGATURAN TEKS & BACKGROUND WARNA    ==
=====================================================
*/
.font-picker-select optgroup {
    font-weight: 700;
    color: var(--primary-color);
    background: #f8fafc;
}

.font-picker-select option {
    padding: 8px 12px;
    font-size: 1rem;
    color: #1e293b;
    background: #ffffff;
}

.text-color-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin: 14px 0 10px 0;
}

.color-picker-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.color-picker-item label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}

.color-picker-item input[type="color"] {
    width: 100%;
    height: 38px;
    padding: 2px;
    border-radius: 8px;
    border: 1.5px solid #cbd5e1;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.2s ease;
}

.color-picker-item input[type="color"]:hover {
    border-color: var(--primary-color);
}

.bg-text-picker-box {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-toggle-bg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-toggle-bg:hover {
    background: #e2e8f0;
    color: #dc2626;
}

.btn-toggle-bg.active {
    background: #fee2e2;
    border-color: #f87171;
    color: #dc2626;
}

@media (max-width: 480px) {
    .text-color-grid {
        grid-template-columns: 1fr 1fr;
    }
    .color-picker-item:last-child {
        grid-column: span 2;
    }
}

/*
==================================================
== LIVE PREVIEW FONT PADA INPUT TEKS           ==
==================================================
*/
#text-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1.15rem; /* Ukuran font dibuat agak besar agar karakter tiap jenis font terlihat jelas */
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    outline: none;
    transition: font-family 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    box-sizing: border-box;
}

#text-input::placeholder {
    font-family: 'Poppins', sans-serif !important;
    font-style: normal !important;
    font-weight: 400 !important;
    color: #94a3b8;
    font-size: 0.95rem;
}

#text-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 74, 173, 0.12);
}