:root {
    --bg-darker: #050505;
    --bg-dark: #0a0a0c;
    --bg-card: #121315;
    --bg-card-hover: #1a1b1d;
    --text-pure: #ffffff;
    --text-primary: #ededed;
    --text-secondary: #8c8c8c;
    --text-muted: #595959;
    --border-color: #212121;
    --accent: #ffffff;
    --accent-bg: #2a2a2a;
    --danger: #cf6679;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

/* Top Mobile App Header */
.top-header {
    background-color: var(--bg-darker);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icon {
    color: var(--text-primary);
}

.header-titles {
    display: flex;
    flex-direction: column;
}

.header-main-title {
    font-size: 15px;
    font-weight: 500;
}

.header-sub-title {
    font-size: 12px;
    color: var(--text-secondary);
}

.header-right {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Layout */
.app-container {
    display: flex;
    height: calc(100vh - 60px);
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100%;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    top: 0;
    left: 0;
}

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

@media (min-width: 992px) {
    .sidebar {
        position: sticky;
        transform: translateX(0);
        height: calc(100vh - 60px);
    }
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 18px;
    color: var(--text-pure);
}

.close-sidebar {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: block;
}

@media (min-width: 992px) {
    .close-sidebar {
        display: none;
    }
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.sidebar-content::-webkit-scrollbar {
    width: 4px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.menu-section {
    margin-bottom: 24px;
}

.menu-title {
    padding: 0 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.menu-item svg {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.menu-item:hover {
    background-color: var(--bg-card-hover);
    color: var(--text-primary);
}

.menu-item.active {
    background-color: var(--accent-bg);
    color: var(--text-pure);
    border-right: 3px solid var(--accent);
}

.menu-item.active svg {
    opacity: 1;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.upgrade-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--text-pure);
    color: #000;
    text-decoration: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: opacity 0.2s;
}

.upgrade-btn:hover {
    opacity: 0.9;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .main-content {
        padding: 16px;
    }
}

.page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 992px) {
    .menu-toggle {
        display: none;
    }
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

/* Pricing Grid */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.price-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: transform 0.2s;
}
.price-card:hover {
    transform: translateY(-5px);
    border-color: #333;
}
.plan-name {
    font-size: 13px;
    letter-spacing: 2px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 15px;
}
.plan-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-pure);
    margin-bottom: 5px;
}
.plan-period {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 25px;
}
.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    font-size: 14px;
    color: var(--text-muted);
}
.plan-features li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}
.plan-features li:last-child {
    border-bottom: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    align-items: center;
    justify-content: center;
}
.modal.active {
    display: flex;
}
.modal-content {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    position: relative;
    color: var(--text-primary);
}
.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}
.close-modal:hover {
    color: var(--text-pure);
}

/* Orders List */
.order-item {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}
.order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}
.order-id { font-weight: 600; color: var(--text-pure); }
.order-date { font-size: 12px; color: var(--text-muted); }
.order-status {
    padding: 4px 10px; border-radius: 4px; font-size: 11px; font-weight: 600; text-transform: uppercase;
}
.status-pending { background-color: #333; color: #e5c07b; }
.status-done { background-color: #1e3a29; color: #4ade80; }
.status-batal { background-color: #3a1e1e; color: #f87171; }
.order-api-key {
    background-color: var(--card-bg); padding: 10px; border-radius: 6px; font-family: monospace; color: #4ade80; margin-top:10px; word-break: break-all;
}

.user-avatar {
    margin-left: auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #333;
    flex-shrink: 0;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

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

.stat-icon {
    background-color: var(--accent-bg);
    padding: 6px;
    border-radius: 6px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-pure);
}

@media (max-width: 576px) {
    .stat-value {
        font-size: 18px;
    }
    .stat-card {
        padding: 16px;
    }
}

/* General Cards */
.content-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

@media (max-width: 576px) {
    .content-card {
        padding: 20px;
    }
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

/* API Check Form */
.api-check-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-input {
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 14px;
    width: 100%;
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--text-secondary);
}

.btn {
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--text-pure);
    color: #000;
}

.btn-primary:hover {
    background-color: #e0e0e0;
}

.btn-secondary {
    background-color: #2a2a2a;
    color: var(--text-pure);
}
.btn-secondary:hover {
    background-color: #3a3a3a;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 20px;
}

.btn-outline:hover {
    background-color: var(--bg-dark);
}

.btn-block {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
}

.mt-4 {
    margin-top: 24px;
}

/* Welcome Card */
.welcome-card .welcome-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.info-value {
    font-size: 14px;
    font-weight: 500;
}

/* Table */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Overlay for Mobile Sidebar */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 90;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.overlay.active {
    display: block;
    opacity: 1;
}

@media (min-width: 992px) {
    .overlay.active {
        display: none;
    }
}
