/* --- GAPDIRIK ADMIN PANEL DESIGN SYSTEM (v1.0) --- */

:root {
    --bg-dark: #090a0f;
    --panel-bg: rgba(17, 20, 32, 0.45);
    --panel-border: rgba(255, 255, 255, 0.08);
    --panel-glow: rgba(108, 92, 231, 0.15);
    
    --primary: #6c5ce7;
    --primary-glow: rgba(108, 92, 231, 0.4);
    --gold: #fdcb6e;
    --gold-glow: rgba(253, 203, 110, 0.3);
    
    --text-main: #f5f6fa;
    --text-muted: #a4b0be;
    --text-error: #ff7675;
    --text-success: #55efc4;
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- BACKGROUND BLOWS --- */
.bg-glow-1 {
    position: absolute;
    top: -200px;
    left: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.22) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
}

.bg-glow-2 {
    position: absolute;
    bottom: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(253, 203, 110, 0.12) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* --- UTILITY CLASSES --- */
.mt-4 { margin-top: 1.5rem; }
.mt-2 { margin-top: 0.75rem; }
.highlight { color: var(--gold); font-weight: 600; }

/* --- GLASS PANEL COMPONENT --- */
.glass-panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5), 0 0 15px 0 var(--panel-glow);
}

/* --- LOGIN SCREEN STYLES --- */
.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.6s ease-out;
}

.login-card {
    width: 100%;
    padding: 40px 30px;
}

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

.login-header h2 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.login-header h2 span {
    color: var(--gold);
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 5px;
}

/* --- FORMS --- */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: all 0.25s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 8px 0 var(--primary-glow);
}

.error-msg {
    color: var(--text-error);
    background: rgba(255, 118, 117, 0.15);
    border: 1px solid rgba(255, 118, 117, 0.3);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 20px;
    text-align: center;
    animation: shake 0.3s ease-in-out;
}

/* --- BUTTONS --- */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, #4834d4 100%);
    border: none;
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px 0 var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 var(--primary-glow);
    filter: brightness(1.1);
}

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

/* --- APP CONTAINER LAYOUT --- */
.app-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    animation: fadeIn 0.5s ease-out;
}

/* --- SIDEBAR --- */
.sidebar {
    width: 280px;
    height: calc(100vh - 40px);
    margin: 20px 0 20px 20px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    text-align: center;
    margin-bottom: 40px;
}

.sidebar-brand h3 {
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.sidebar-brand .badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--gold-glow);
    border: 1px solid var(--gold);
    color: var(--gold);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    margin-top: 6px;
    letter-spacing: 1px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.nav-link {
    width: 100%;
    padding: 14px 20px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.25s ease;
}

.nav-link .icon {
    font-size: 1.1rem;
}

.nav-link:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--text-main);
    background: rgba(108, 92, 231, 0.15);
    border-color: rgba(108, 92, 231, 0.3);
    box-shadow: 0 0 10px 0 rgba(108, 92, 231, 0.1);
}

.btn-logout {
    width: 100%;
    padding: 12px 20px;
    background: rgba(255, 118, 117, 0.1);
    border: 1px solid rgba(255, 118, 117, 0.2);
    border-radius: 10px;
    color: var(--text-error);
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.25s ease;
}

.btn-logout:hover {
    background: rgba(255, 118, 117, 0.2);
    border-color: var(--text-error);
}

/* --- CONTENT AREA --- */
.content-wrapper {
    flex-grow: 1;
    height: 100vh;
    padding: 40px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

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

.header-title h2 {
    font-size: 1.8rem;
    font-weight: 600;
}

.header-title p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.user-profile .avatar {
    font-size: 1.5rem;
}

.profile-info {
    display: flex;
    flex-direction: column;
}

.profile-info .username {
    font-weight: 600;
    font-size: 0.9rem;
}

.profile-info .role {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* --- DASHBOARD TAB --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.stat-icon {
    font-size: 2rem;
    position: absolute;
    right: 20px;
    top: 20px;
    opacity: 0.75;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Pulsing Online Dot */
.stat-icon.online {
    animation: pulse 1.8s infinite;
}

.info-panel {
    padding: 30px;
    line-height: 1.6;
}

.info-panel h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.info-panel p {
    color: var(--text-muted);
}

/* --- SEO & CONFIG TAB --- */
.seo-container {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 30px;
    align-items: start;
}

.seo-card {
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.seo-card h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.seo-card .description {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

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

.form-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group label .tooltip {
    cursor: help;
    font-size: 0.9rem;
    opacity: 0.6;
}

.status-box {
    padding: 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease;
}

.status-box.success {
    color: var(--text-success);
    background: rgba(85, 239, 196, 0.12);
    border: 1px solid rgba(85, 239, 196, 0.3);
}

.status-box.error {
    color: var(--text-error);
    background: rgba(255, 118, 117, 0.12);
    border: 1px solid rgba(255, 118, 117, 0.3);
}

/* Code Preview styles */
.preview-card {
    align-self: stretch;
}

.code-preview {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.code-preview h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.code-preview pre {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
    overflow-x: auto;
    max-height: 220px;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.8rem;
    color: #00ffcc;
    white-space: pre-wrap;
    word-break: break-all;
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.5; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* --- RESPONSIVE STYLES --- */
@media (max-width: 1024px) {
    .seo-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        width: calc(100% - 40px);
        height: auto;
        margin: 20px;
    }
    .content-wrapper {
        padding: 20px;
    }
}

/* --- BADGES & STATUSES --- */
.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-vip {
    background: rgba(253, 203, 110, 0.15);
    border: 1px solid var(--gold);
    color: var(--gold);
    box-shadow: 0 0 10px rgba(253, 203, 110, 0.15);
}

.badge-normal {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
}

.badge-banned {
    background: rgba(255, 118, 117, 0.15);
    border: 1px solid var(--text-error);
    color: var(--text-error);
}

.badge-active {
    background: rgba(85, 239, 196, 0.15);
    border: 1px solid var(--text-success);
    color: var(--text-success);
}

/* --- TABLE ROW HOVER & BTN EFFECTS --- */
.table-row-hover {
    transition: background-color 0.2s ease;
}

.table-row-hover:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.btn-action-edit {
    background: rgba(108, 92, 231, 0.15);
    border: 1px solid rgba(108, 92, 231, 0.3);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action-edit:hover {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
    transform: translateY(-1px);
}

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

/* --- STORE MANAGEMENT BADGES & BTNS --- */
.badge-chip {
    background: rgba(9, 132, 227, 0.15);
    border: 1px solid #0984e3;
    color: #74b9ff;
}
.badge-diamond {
    background: rgba(224, 86, 253, 0.15);
    border: 1px solid #be2edd;
    color: #e056fd;
}
.badge-ticket {
    background: rgba(26, 188, 156, 0.15);
    border: 1px solid #1abc9c;
    color: #1dd1a1;
}
.badge-character {
    background: rgba(230, 126, 34, 0.15);
    border: 1px solid #e67e22;
    color: #f39c12;
}
.badge-emoji {
    background: rgba(241, 196, 15, 0.15);
    border: 1px solid #f1c40f;
    color: #f5cd79;
}
.btn-action-delete {
    background: rgba(255, 118, 117, 0.15);
    border: 1px solid rgba(255, 118, 117, 0.3);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 6px;
}
.btn-action-delete:hover {
    background: var(--text-error);
    border-color: var(--text-error);
    box-shadow: 0 0 10px rgba(255, 118, 117, 0.4);
    transform: translateY(-1px);
}
.btn-action-delete:active {
    transform: translateY(0);
}
.file-upload-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}
.btn-upload-trigger {
    background: rgba(253, 203, 110, 0.15);
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-upload-trigger:hover {
    background: var(--gold);
    color: #111420;
    box-shadow: 0 0 10px var(--gold-glow);
}
.image-preview-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

