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

/* =====================================================
   CSS VARIABLES & RESET
   ===================================================== */
:root {
    /* =====================================================
       POKEMON LIGHT THEME (Cute Pastels & Pikachu Accents)
       ===================================================== */
    --bg-primary: #fffdf2; /* Soft Pikachu cream background */
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #fff9e6; /* Soft pastel yellow hover */
    --bg-glass: rgba(253, 216, 53, 0.08);
    --bg-input: #ffffff;
    --bg-input-focus: #fffdf2;

    --border-color: #f7edd4;
    --border-active: rgba(241, 196, 15, 0.6);

    --text-primary: #2d3436; /* Cute dark gray text */
    --text-secondary: #636e72;
    --text-muted: #b2bec3;
    --text-accent: #d63031; /* Poke-red accent link */

    --accent-gradient: linear-gradient(
        135deg,
        #ff7675, /* Pastel Red */
        #f1c40f  /* Pikachu Yellow */
    );

    --accent-glow: 0 0 20px rgba(241, 196, 15, 0.15);

    --accent-primary: #f1c40f;
    --accent-secondary: #ff7675;

    /* STATUS */
    --success: #2ecc71;
    --success-bg: rgba(46, 204, 113, 0.08);

    --warning: #f39c12;
    --warning-bg: rgba(243, 156, 18, 0.08);

    --danger: #e74c3c;
    --danger-bg: rgba(231, 76, 60, 0.08);

    --info: #3498db;
    --info-bg: rgba(52, 152, 219, 0.08);

    /* RADIUS */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    /* SHADOW */
    --shadow-sm: 0 2px 4px rgba(180, 160, 140, 0.06);
    --shadow-md: 0 6px 16px rgba(180, 160, 140, 0.10);
    --shadow-lg: 0 16px 36px rgba(180, 160, 140, 0.14);
    --shadow-glow: 0 0 25px rgba(241, 196, 15, 0.08);

    /* TRANSITION */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

    --sidebar-width: 220px;
    --header-height: 70px;
}

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

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background animated gradient */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(
            ellipse 600px 400px at 10% 20%,
            rgba(255, 118, 117, 0.06), /* Soft Poké-red */
            transparent
        ),
        radial-gradient(
            ellipse 500px 500px at 90% 80%,
            rgba(241, 196, 15, 0.05), /* Soft Pikachu-yellow */
            transparent
        );
    pointer-events: none;
    z-index: 0;
}

a { color: var(--text-accent); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: #f1c40f; }

/* Cute Pokemon Sidebar Sprite Decoration */
.sidebar::after {
    content: '';
    display: block;
    width: 90px;
    height: 90px;
    margin: 15px auto 5px;
    background-image: url('https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/official-artwork/25.png'); /* Cute Pikachu */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.9;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.sidebar:hover::after {
    transform: scale(1.15) rotate(7deg);
}

/* Cute Bouncing Sprites on Login Page */
.login-wrapper::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    bottom: 30px;
    right: 35px;
    background-image: url('https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/official-artwork/133.png'); /* Eevee */
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 10;
    animation: cuteBounce 2s infinite alternate;
}
.login-wrapper::after {
    content: '';
    position: absolute;
    width: 110px;
    height: 110px;
    top: 30px;
    left: 35px;
    background-image: url('https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/official-artwork/1.png'); /* Bulbasaur */
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 10;
    animation: cuteBounce 2.5s infinite alternate;
}
@keyframes cuteBounce {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-12px) scale(1.03); }
}

/* =====================================================
   LOGIN PAGE
   ===================================================== */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    animation: slideUp 0.6s ease-out;
}

.login-card .logo {
    text-align: center;
    margin-bottom: 36px;
}

.login-card .logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.login-card .logo p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 6px;
}

/* =====================================================
   LAYOUT: SIDEBAR + MAIN
   ===================================================== */
.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform var(--transition-base);
}

.sidebar-brand {
    padding: 14px 14px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand h2 {
    font-size: 1.2rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-brand small {
    color: var(--text-muted);
    font-size: 0.72rem;
    display: block;
    margin-top: 2px;
}

.sidebar-nav {
    flex: 1;
    padding: 8px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.sidebar-nav a:hover {
    background: rgba(236, 72, 153, 0.05);
    color: var(--text-primary);
}
.sidebar-nav a.active {
    background: rgba(236, 72, 153, 0.10);
    color: var(--accent-primary);
    font-weight: 600;
}

.sidebar-nav a .nav-icon {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 8px 8px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--danger);
    font-size: 0.82rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.sidebar-footer a:hover {
    background: var(--danger-bg);
}

/* =====================================================
   SIDEBAR COLLAPSE — DESKTOP MINI ICON MODE
   ===================================================== */

.sidebar {
    transition:
        width var(--transition-base),
        transform var(--transition-base);
}

/* Main content mengikuti ukuran sidebar */
.main-content {
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition-base);
}

/* Mini sidebar */
.sidebar.collapsed {
    width: 60px;
}

/* Sembunyikan semua teks */
.sidebar.collapsed .sidebar-text {
    display: none;
}

/* Brand */
.sidebar.collapsed .sidebar-brand {
    padding: 10px 4px;
    text-align: center;
}

/* Menu utama */
.sidebar.collapsed .sidebar-nav {
    padding-left: 6px;
    padding-right: 6px;
}

.sidebar.collapsed .sidebar-nav a {
    justify-content: center;
    padding: 9px 4px;
}

.sidebar.collapsed .sidebar-nav a .nav-icon {
    margin: 0;
}

/* Category */
.sidebar.collapsed .sidebar-category {
    justify-content: center;
    padding: 9px 4px;
}

.sidebar.collapsed .sidebar-category .category-arrow {
    display: none;
}

/* Hide submenu saat mini */
.sidebar.collapsed .sidebar-submenu {
    display: none !important;
}

/* Footer */
.sidebar.collapsed .sidebar-footer {
    padding-left: 6px;
    padding-right: 6px;
}

.sidebar.collapsed .sidebar-footer a {
    justify-content: center;
    padding: 9px 4px;
}

.sidebar.collapsed .sidebar-footer a .nav-icon {
    margin: 0;
}

/* Trainer info hilang */
.sidebar.collapsed .sidebar-trainer-info {
    display: none !important;
}

/* Tombol collapse */
.sidebar-collapse-btn {
    display: block;
    width: 100%;
    padding: 7px 0;
    text-align: center;
    background: rgba(241, 196, 15, 0.08);
    border: none;
    border-top: 1px solid var(--border-color);
    color: var(--accent-primary);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.sidebar-collapse-btn:hover {
    background: rgba(241, 196, 15, 0.18);
    color: var(--accent-secondary);
}

/* Main content ketika sidebar mini */
.main-content.expanded {
    margin-left: 60px;
}

/* Main content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.page-header {
    padding: 28px 36px 20px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

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

.page-body {
    padding: 28px 36px 40px;
}

/* =====================================================
   CARDS
   ===================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
}

.trade-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
    width: 100%;
}

.trade-grid > .table-wrapper {
    min-width: 0;
    width: 100%;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(99, 102, 241, 0.2);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card .stat-icon {
    font-size: 1.6rem;
    margin-bottom: 12px;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-top: 4px;
}

/* =====================================================
   TABLE
   ===================================================== */
.table-wrapper {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 12px;
}

.table-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    padding: 14px 20px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    background: #fff5fa;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

tbody tr {
    transition: background var(--transition-fast);
    border-bottom: 1px solid #f7e8ef;
}

tbody tr:last-child {
    border-bottom: none;
}

tbody tr:hover {
    background: #fff7fb;
}

tbody td {
    padding: 14px 20px;
    font-size: 0.9rem;
    vertical-align: middle;
}

.coin-name {
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* =====================================================
   BADGES
   ===================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-info {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.badge-vps {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(236, 72, 153, 0.35);
    color: white;
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-input-focus);
    color: var(--text-primary);
}

.btn-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
    background: rgba(16, 185, 129, 0.2);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.78rem;
}

.btn-icon {
    padding: 8px;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.btn-icon:hover {
    background: var(--bg-input-focus);
    color: var(--text-primary);
}

.btn-icon.danger:hover {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.action-buttons {
    display: flex;
    gap: 6px;
}

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

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    outline: none;
}

.form-control:focus {
    background: #ffffff;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.10);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' 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;
    padding-right: 40px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.form-check label {
    margin-bottom: 0;
    text-transform: none;
    cursor: pointer;
}

/* =====================================================
   MODAL
   ===================================================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(50, 20, 35, 0.35);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

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

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition-fast);
    line-height: 1;
}

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

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

/* =====================================================
   FLASH MESSAGES
   ===================================================== */
.flash-message {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease-out;
}

.flash-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.flash-error {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.flash-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* =====================================================
   TOGGLE SWITCH
   ===================================================== */
.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    display: inline-block;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #e8dfe5;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    top: 3px;
    left: 3px;
    transition: all var(--transition-fast);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.toggle input:checked + .toggle-slider {
    background: rgba(236, 72, 153, 0.35);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);
    background: var(--accent-primary);
}

/* =====================================================
   ACTIVITY LOG
   ===================================================== */
.log-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.log-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.log-icon.create { background: var(--success-bg); color: var(--success); }
.log-icon.update { background: var(--info-bg); color: var(--info); }
.log-icon.delete { background: var(--danger-bg); color: var(--danger); }
.log-icon.login  { background: rgba(99, 102, 241, 0.1); color: var(--accent-primary); }
.log-icon.toggle { background: var(--warning-bg); color: var(--warning); }

.log-content { flex: 1; }

.log-content strong {
    color: var(--text-primary);
}

.log-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.log-content small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* =====================================================
   EMPTY STATE
   ===================================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.85rem;
}

/* =====================================================
   INLINE EDIT (Max Saldo)
   ===================================================== */
.inline-edit {
    display: flex;
    align-items: center;
    gap: 6px;
}

.inline-edit .value {
    font-weight: 600;
    color: var(--success);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.inline-edit .value:hover {
    background: var(--success-bg);
}

.inline-edit-form {
    display: none;
    align-items: center;
    gap: 6px;
}

.inline-edit-form.active {
    display: flex;
}

.inline-edit-form input {
    width: 120px;
    padding: 6px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-active);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
}

/* =====================================================
   PAGINATION
   ===================================================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px;
}

.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.pagination a {
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.pagination a:hover {
    background: var(--bg-input-focus);
    color: var(--text-primary);
}

.pagination .active {
    background: var(--accent-gradient);
    color: white;
    border: none;
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

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

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-in {
    animation: slideUp 0.4s ease-out both;
}

.animate-in:nth-child(2) { animation-delay: 50ms; }
.animate-in:nth-child(3) { animation-delay: 100ms; }
.animate-in:nth-child(4) { animation-delay: 150ms; }

/* =====================================================
   SCROLLBAR
   ===================================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

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

/* Mobile overlay when sidebar is open */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* Hamburger button */
.mobile-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: none;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 200;
    box-shadow: 0 4px 20px rgba(236, 72, 153, 0.4);
    transition: transform 0.2s ease;
}
.mobile-toggle:active {
    transform: scale(0.9);
}

/* Mobile top bar */
.mobile-topbar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 90;
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
}
.mobile-topbar .topbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}
.mobile-topbar .topbar-brand img {
    width: 24px;
    height: 24px;
    animation: rotateBall 3s linear infinite;
}
.mobile-topbar .topbar-brand span {
    font-size: 1rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.mobile-topbar .topbar-menu-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 8px;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    /* Jangan gunakan mode mini di mobile */
    .sidebar.collapsed {
        width: 260px;
    }

    .sidebar.collapsed .sidebar-text {
        display: inline;
    }

    .main-content {
        margin-left: 0;
        padding-top: 52px;
    }

    .mobile-topbar {
        display: flex;
    }

    .page-header {
        position: relative;
        top: auto;
    }

    .page-header, .page-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .page-header h1 {
        font-size: 1.3rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
    }

    .mobile-toggle {
        display: block !important;
    }

    .trade-grid {
        grid-template-columns: 1fr;
    }

    /* Compact stat cards on mobile */
    .stat-card {
        padding: 14px;
    }

    .stat-card .stat-number {
        font-size: 1.2rem;
    }

    /* Compact card padding */
    .card {
        padding: 16px !important;
    }
}

/* Sidebar submenu categories — Pokémon Accordion */
.sidebar-category {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-secondary);
    padding: 10px 12px 6px;
    margin-top: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    user-select: none;
}
.sidebar-category:hover {
    background: rgba(255, 118, 117, 0.08);
    color: var(--accent-primary);
}
.sidebar-category .category-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 1px 3px rgba(241, 196, 15, 0.4));
    flex-shrink: 0;
}
.sidebar-category .category-arrow {
    margin-left: auto;
    font-size: 0.6rem;
    transition: transform var(--transition-fast);
    opacity: 0.6;
}
.sidebar-submenu {
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-submenu.collapsed {
    max-height: 0 !important;
}
.sidebar-sub-link {
    padding-left: 36px !important;
    position: relative;
}
.sidebar-sub-link::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    opacity: 0.55;
    transition: all var(--transition-fast);
}
.sidebar-sub-link.active::before {
    background: var(--accent-secondary);
    opacity: 1;
    transform: translateY(-50%) scale(1.3);
}

/* Sidebar Collapse Button */
.sidebar-collapse-btn {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 32px;

    margin-top: 4px;

    padding: 0;

    background: rgba(241, 196, 15, 0.08);
    border: none;
    border-top: 1px solid var(--border-color);

    color: var(--accent-primary);

    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;

    cursor: pointer;

    transition:
        background var(--transition-fast),
        color var(--transition-fast);
}

.sidebar-collapse-btn:hover {
    background: rgba(241, 196, 15, 0.18);
    color: var(--accent-secondary);
}

/* ═══ COLLAPSED SIDEBAR (Mini Icon Mode) ═══ */
.sidebar.collapsed {
    width: 60px;
}
.sidebar.collapsed .sidebar-text {
    display: none;
}
.sidebar.collapsed .sidebar-brand {
    padding: 10px 4px !important;
}
.sidebar.collapsed .sidebar-nav a {
    justify-content: center;
    padding: 8px 4px;
}
.sidebar.collapsed .sidebar-nav a .nav-icon {
    margin: 0;
}
.sidebar.collapsed .sidebar-category {
    justify-content: center;
    padding: 8px 4px;
}
.sidebar.collapsed .sidebar-category .category-arrow {
    display: none;
}
.sidebar.collapsed .sidebar-submenu {
    display: none !important;
}
.sidebar.collapsed .sidebar-footer a {
    justify-content: center;
    padding: 8px 4px;
}
.sidebar.collapsed .sidebar-footer a .nav-icon {
    margin: 0;
}
.sidebar.collapsed .sidebar-trainer-info {
    display: none !important;
}
.sidebar.collapsed::after {
    display: none;
}
.sidebar.collapsed + .main-content,
.main-content.expanded {
    margin-left: 60px;
}
.sidebar.collapsed .sidebar-collapse-btn {
    width: 100%;
    height: 32px;
    margin-top: 4px;
}
/* iPhone 15 specific (393px width) */
@media (max-width: 430px) {
    .mobile-toggle, .topbar-menu-btn {
        display: none !important;
    }

    .page-header {
        padding: 16px 14px 14px;
    }

    .page-header h1 {
        font-size: 1.15rem;
    }

    .page-header p {
        font-size: 0.8rem;
    }

    .page-body {
        padding-left: 12px;
        padding-right: 12px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stat-card .stat-label {
        font-size: 0.7rem;
    }

    .stat-card .stat-number {
        font-size: 1rem;
    }

    .btn {
        padding: 10px 16px;
        font-size: 0.82rem;
    }

    .btn-sm {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    /* Action buttons stack vertically on very small screens */
    .action-buttons {
        flex-direction: column;
        gap: 4px;
    }

    /* Form adjustments */
    .form-control {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
/* =====================================================
   CONFIRM DIALOG
   ===================================================== */
.confirm-dialog {
    text-align: center;
    padding: 20px 0;
}

.confirm-dialog .icon {
    font-size: 3rem;
    color: var(--danger);
    margin-bottom: 16px;
}

.confirm-dialog h3 {
    margin-bottom: 8px;
}

.confirm-dialog p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

/* Password visibility toggle */
.password-wrapper {
    position: relative;
}

.password-wrapper .toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    transition: color var(--transition-fast);
}

.password-wrapper .toggle-password:hover {
    color: var(--text-primary);
}


/* =====================================================
   POKEMON THEME EXTRA STYLES
   ===================================================== */
@keyframes rotateBall {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.sidebar-brand img {
    filter: drop-shadow(0 2px 5px rgba(255, 118, 117, 0.3));
}

.sidebar-nav a .nav-icon img,
.sidebar-footer a .nav-icon img {
    transition: transform var(--transition-fast);
    vertical-align: middle;
    width: 26px !important;
    height: 26px !important;
}

.sidebar-nav a:hover .nav-icon img,
.sidebar-footer a:hover .nav-icon img {
    transform: scale(1.3) translateY(-2px);
}


/* =====================================================
   CHANGELOG MODAL STYLES
   ===================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 30px;
    width: 92%;
    max-width: 550px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transform: translateY(25px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}
.modal-overlay.show .modal-content {
    transform: translateY(0);
}
.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 1.8rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition-fast);
}
.modal-close-btn:hover {
    color: var(--danger);
}