/*
 * Dabis Payment Gateway
 * Theme: GoTo/GoPay Indonesian Super App UI
 */

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

:root {
    /* Colors - GoTo/GoPay Style */
    --bg-main: #F5F6F8;
    --bg-card: #FFFFFF;
    --border-card: #E5E7E9;
    --border-light: #F0F2F5;

    /* Accents */
    --primary: #00880D; /* Gojek Green */
    --primary-hover: #00700B;
    --primary-bg: #E5F3E6; /* Light green for active/highlight states */
    --primary-light: #43B549; /* Lighter green */
    --secondary: #00A5CF; /* GoPay Blueish accent */
    --secondary-bg: #E5F6FA;

    /* Status */
    --success: #00880D;
    --success-bg: #E5F3E6;
    --warning: #FF7F00;
    --warning-bg: #FFF2E5;
    --danger: #EE2737; /* Gojek Red */
    --danger-bg: #FDE9EB;
    --paid-text: #00880D;

    /* Text */
    --text-main: #1C1E23;
    --text-sec: #68737D;
    --text-muted: #9BA3A9;

    /* Spacing & Radius */
    --radius-lg: 24px;
    --radius: 16px;
    --radius-sm: 12px;
    --radius-xs: 8px;

    --shadow-sm: 0 2px 8px rgba(28, 30, 35, 0.05);
    --shadow: 0 4px 20px rgba(28, 30, 35, 0.08);
    --shadow-lg: 0 12px 32px rgba(28, 30, 35, 0.12);

    --font-body: 'Plus Jakarta Sans', sans-serif;
    --font-head: 'Plus Jakarta Sans', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.container {
    max-width: 600px; /* Mobile first, tighter max-width for super-app feel */
    margin: 0 auto;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
}

.container-fluid {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: none;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

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

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--text-main);
    margin-top: 0;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

p {
    color: var(--text-sec);
    font-size: 14px;
    margin-top: 0;
    margin-bottom: 16px;
}

a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 99px; /* Pill shape like GoPay */
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 15px;
    font-family: var(--font-body);
    width: 100%;
    box-sizing: border-box;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 136, 13, 0.2);
}

.btn-secondary {
    background: var(--primary-bg);
    color: var(--primary);
}

.btn-secondary:hover {
    background: #D1EBD2;
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-card);
}

.btn-danger {
    background: var(--danger-bg);
    color: var(--danger);
}
.btn-danger:hover {
    background: #FAD1D4;
}

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

input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
input[type="file"],
select {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--border-card);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-main);
    background: var(--bg-card);
    transition: all 0.2s;
    box-sizing: border-box;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-bg);
}

input::placeholder {
    color: var(--text-muted);
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-main);
    font-size: 14px;
}

/* Tables / Lists (Mobile Optimized) */
.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.tx-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tx-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.tx-details h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
}

.tx-details p {
    margin: 0;
    font-size: 13px;
    color: var(--text-sec);
}

.tx-right {
    text-align: right;
}

.tx-amount {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-main);
    margin-bottom: 4px;
}

/* Badges */
.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.badge-pending {
    background: var(--warning-bg);
    color: var(--warning);
}

.badge-paid, .badge-success {
    background: var(--success-bg);
    color: var(--success);
}

.badge-expired, .badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

/* Specific Page Styles */

/* Payment Page (Pay Screen) */
.payment-card {
    max-width: 480px;
    margin: 40px auto;
    text-align: center;
    padding: 32px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.amount-display {
    font-family: var(--font-head);
    font-size: 40px;
    font-weight: 800;
    color: var(--text-main);
    margin: 8px 0 24px 0;
    letter-spacing: -1px;
}

.qr-container {
    width: 100%;
    margin: 24px 0;
    display: flex;
    justify-content: center;
    background: #fff;
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    box-sizing: border-box;
}

.qr-container svg, .qr-container img {
    width: 100%;
    max-width: 250px;
    height: auto;
}

.countdown-badge {
    background: var(--warning-bg);
    color: var(--warning);
    padding: 8px 16px;
    border-radius: 99px;
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Dashboard Specifics */
.wallet-card {
    background: var(--primary);
    color: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 12px 24px rgba(0, 136, 13, 0.2);
}

.wallet-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.wallet-card::after {
    content: '';
    position: absolute;
    bottom: -30px;
    right: 40px;
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.wallet-label {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 8px;
}

.wallet-balance {
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 20px 0;
    letter-spacing: -1px;
}

.wallet-actions {
    display: flex;
    gap: 12px;
}

.wallet-actions .btn {
    background: rgba(255,255,255,0.2);
    color: white;
    backdrop-filter: blur(4px);
    width: auto;
    flex: 1;
}

.wallet-actions .btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Grid Actions */
.action-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-main);
}

.action-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: transform 0.2s;
}

.action-item:hover .action-icon {
    transform: translateY(-2px);
    border-color: var(--primary);
    color: var(--primary);
}

.action-label {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

/* Utilities */
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.mb-0 { margin-bottom: 0; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* Code Box */
.code-box {
    background: var(--bg-main);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-family: monospace;
    font-size: 14px;
    color: var(--text-main);
    word-break: break-all;
    user-select: all;
    border: 1px dashed var(--border-card);
}

.avatar {
    width: 48px;
    height: 48px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}