:root {
    --bg: #f0f2f5;
    --card: #ffffff;
    --border: #e4e6ea;
    --text: #1a1a2e;
    --muted: #6c757d;
    --accent: #4361ee;
    --accent-hover: #3451d1;
    --success: #2ecc71;
    --danger: #e74c3c;
    --warning: #f39c12;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
}

/* LOGIN */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f2f5 0%, #e8ecf3 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 2.8rem 2.5rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 40px rgba(67,97,238,0.08);
    background: white;
}

.login-logo {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -1px;
}

.login-sub {
    color: var(--muted);
    font-size: 0.92rem;
}

.btn-google {
    background: #fff;
    border: 1.5px solid var(--border);
    color: var(--text);
    border-radius: 12px;
    font-weight: 600;
    padding: 0.75rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    transition: all 0.2s;
    width: 100%;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-google:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    border-color: #ccc;
    color: var(--text);
}

/* DASHBOARD WRAPPER */
.dashboard-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

/* HEADER */
.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    background: white;
    border-radius: 18px;
    padding: 1.2rem 1.6rem;
    border: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.dash-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
}

.dash-subtitle {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 2px;
}

.btn-logout {
    background: #f8f9fa;
    border: 1.5px solid var(--border);
    color: var(--muted);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.45rem 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: var(--danger);
}

/* ALERT */
.alert-pending {
    background: #fffbeb;
    border: 1.5px solid #fde68a;
    border-radius: 14px;
    padding: 1rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.92rem;
}

.alert-pending i {
    font-size: 1.4rem;
    color: var(--warning);
    flex-shrink: 0;
}

.alert-pending .btn-review {
    margin-left: auto;
    background: var(--warning);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.35rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

/* GRID DE CARDS */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.1rem;
}

.dash-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem 1rem 1.6rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.dash-card:hover {
    box-shadow: 0 8px 28px rgba(67,97,238,0.13);
    transform: translateY(-3px);
    border-color: var(--accent);
    color: var(--accent);
}

.dash-card .icon-wrap {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: linear-gradient(135deg, #eef0fd, #dde1fb);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.3rem;
    transition: all 0.2s;
}

.dash-card:hover .icon-wrap {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
}

.dash-card i {
    font-size: 1.6rem;
    color: var(--accent);
    transition: color 0.2s;
}

.dash-card:hover i {
    color: white;
}

.dash-card span {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .dashboard-wrapper { padding: 1.2rem 0.8rem; }
    .dash-grid { grid-template-columns: repeat(2, 1fr); }
    .dash-header { flex-direction: column; gap: 0.8rem; text-align: center; }
}
/* TABLA */
.table-card {
    background: white;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    overflow: hidden;
}

.poly-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.poly-table thead tr {
    background: #f8f9fb;
    border-bottom: 1.5px solid var(--border);
}

.poly-table th {
    padding: 0.9rem 1.2rem;
    font-weight: 600;
    color: var(--muted);
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.poly-table td {
    padding: 0.9rem 1.2rem;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: middle;
}

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

.poly-table tbody tr:hover {
    background: #fafbff;
}

/* USER CELL */
.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-placeholder {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #eef0fd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1rem;
}

/* BADGES */
.badge-status {
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-block;
}

.badge-status.approved { background: #d1fae5; color: #065f46; }
.badge-status.pending  { background: #fef3c7; color: #92400e; }
.badge-status.rejected { background: #fee2e2; color: #991b1b; }
.badge-status.admin    { background: #e0e7ff; color: #3730a3; }
.badge-status.user-role { background: #f3f4f6; color: #374151; }

/* FEE FORM */
.fee-form {
    display: flex;
    align-items: center;
    gap: 5px;
}

.fee-select {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 0.3rem 0.4rem;
    font-size: 0.8rem;
    color: var(--text);
    background: white;
    cursor: pointer;
}

.fee-input {
    width: 65px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
    color: var(--text);
}

.fee-input:focus, .fee-select:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-fee {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.3rem 0.6rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-fee:hover { background: var(--accent-hover); }

/* ACTION BUTTONS */
.action-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-action {
    border: none;
    border-radius: 8px;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action.approve {
    background: #d1fae5;
    color: #065f46;
}

.btn-action.approve:hover {
    background: #a7f3d0;
}

.btn-action.reject {
    background: #fee2e2;
    color: #991b1b;
}

.btn-action.reject:hover {
    background: #fecaca;
}

/* RESPONSIVE TABLA */
@media (max-width: 768px) {
    .table-card { overflow-x: auto; }
    .poly-table { min-width: 600px; }
}
/* FORM CARD */
.form-card {
    background: white;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    padding: 2rem;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.company-logo-preview {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    object-fit: cover;
    border: 1.5px solid var(--border);
}

.company-logo-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: #eef0fd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--accent);
    border: 1.5px solid var(--border);
}

.divider {
    border: none;
    border-top: 1.5px solid var(--border);
    margin: 1.2rem 0 1.5rem;
}

.form-group {
    margin-bottom: 1.4rem;
}

.form-label-custom {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.input-custom {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 0.7rem 1rem;
    font-size: 0.92rem;
    color: var(--text);
    background: white;
    transition: border-color 0.2s;
}

.input-custom:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(67,97,238,0.08);
}

.input-hint {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 0.4rem;
}

.file-upload-area {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 1.2rem;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    font-size: 0.88rem;
    transition: all 0.2s;
}

.file-upload-area:hover {
    border-color: var(--accent);
    background: #f5f7ff;
    color: var(--accent);
}

.fee-display {
    background: #f8f9fb;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 0.7rem 1rem;
    font-size: 0.92rem;
    color: var(--muted);
}

.btn-save {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(67,97,238,0.25);
}

.btn-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(67,97,238,0.35);
}

/* ALERTS */
.alert-success-custom {
    background: #d1fae5;
    color: #065f46;
    border-radius: 12px;
    padding: 0.85rem 1.2rem;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-error-custom {
    background: #fee2e2;
    color: #991b1b;
    border-radius: 12px;
    padding: 0.85rem 1.2rem;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fw-600 { font-weight: 600; }
/* RATE BANNER */
.rate-banner {
    background: #eef0fd;
    border: 1.5px solid #c7d0f8;
    border-radius: 12px;
    padding: 0.75rem 1.2rem;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* CONVERSION */
.conversion-display {
    background: #f8f9fb;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 1rem 1.2rem;
    margin-bottom: 1.4rem;
    text-align: center;
}

.conversion-label {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 4px;
}

.conversion-amount {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent);
}

.conversion-sub {
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 4px;
}

/* INPUT PREFIX */
.input-prefix-wrap {
    display: flex;
    align-items: center;
}

.input-prefix {
    background: #f0f2f5;
    border: 1.5px solid var(--border);
    border-right: none;
    border-radius: 12px 0 0 12px;
    padding: 0.7rem 0.9rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--muted);
}

.input-with-prefix {
    border-radius: 0 12px 12px 0 !important;
    flex: 1;
}

/* INVOICE LAYOUT */
.invoice-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

@media (max-width: 700px) {
    .invoice-layout { grid-template-columns: 1fr; }
}

/* QR CARD */
.qr-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.qr-status {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: 20px;
}

.qr-status.pending  { background: #fef3c7; color: #92400e; }
.qr-status.confirmed { background: #d1fae5; color: #065f46; }
.qr-status.failed   { background: #fee2e2; color: #991b1b; }

.qr-image {
    width: 220px;
    height: 220px;
    border-radius: 16px;
    border: 2px solid var(--border);
    padding: 8px;
}

.qr-amount {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
}

.qr-usdt {
    font-size: 0.9rem;
    color: var(--muted);
}

.btn-pay-link {
    background: var(--accent);
    color: white;
    border-radius: 10px;
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-pay-link:hover {
    background: var(--accent-hover);
    color: white;
}

/* INVOICE DETAIL */
.detail-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 0;
    border-bottom: 1px solid #f0f2f5;
    font-size: 0.88rem;
}

.detail-row span { color: var(--muted); }
.detail-row.highlight strong { color: var(--accent); font-size: 1rem; }

.wallet-short {
    font-size: 0.75rem;
    word-break: break-all;
    text-align: right;
    max-width: 180px;
}

.tx-link {
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 600;
}

.btn-refresh {
    width: 100%;
    margin-top: 1rem;
    background: #f0f2f5;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 0.6rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-refresh:hover {
    background: #e8ecf3;
}

/* EMPTY STATE */
.empty-state {
    padding: 3rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
/* SETTINGS SECTIONS */
.settings-section {
    margin-bottom: 0.5rem;
}

.settings-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.settings-section-title i {
    color: var(--accent);
}

.settings-section-desc {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.5;
}
