/* NovaPay Admin Dashboard - Styles */

:root {
    --nova-primary: #0f172a;
    --nova-primary-light: #1e293b;
    --nova-primary-dark: #020617;
    --nova-accent: #6366f1;
    --nova-accent-light: #818cf8;
    --color-success: #10b981;
    --color-danger: #ef4444;
    --color-warning: #f59e0b;
    --color-info: #3b82f6;
    --color-muted: #6b7280;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.5;
}

/* Header */
.header {
    background-color: var(--nova-primary);
    color: white;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.logo-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-text .accent {
    color: var(--nova-accent-light);
}

.header-title {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.7;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

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

.header-user {
    font-size: 13px;
    opacity: 0.8;
}

.timestamp {
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 12px;
    opacity: 0.6;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Main Content */
.main-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

.back-link {
    display: inline-block;
    color: var(--nova-accent);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 16px;
}

.back-link:hover {
    text-decoration: underline;
}

/* Search Container */
.search-container {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    max-width: 520px;
    margin: 60px auto;
}

.search-container h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--nova-primary);
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 14px;
}

/* Forms */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--nova-accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

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

.btn-primary:hover:not(:disabled) {
    background-color: var(--nova-accent-light);
}

/* Cards */
.cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.card {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card.full-width {
    grid-column: 1 / -1;
}

.card-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-light);
}

.card-content {
    padding: 20px;
}

/* Info Rows */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.info-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.info-value {
    font-size: 14px;
    color: var(--text-primary);
    text-align: right;
    font-weight: 500;
}

/* Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background-color: #d1fae5;
    color: #065f46;
}

.status-blocked {
    background-color: #fee2e2;
    color: #991b1b;
}

.tier-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.tier-gold {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #78350f;
}

.tier-silver {
    background: linear-gradient(135deg, #d1d5db, #9ca3af);
    color: #374151;
}

/* Toggle Switch */
.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.toggle-row:last-child {
    border-bottom: none;
}

.toggle-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.toggle-description {
    font-size: 12px;
    color: var(--text-muted);
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #cbd5e1;
    border-radius: 24px;
    transition: background-color 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--color-success);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.toggle-status {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
    min-width: 24px;
}

.toggle-status.on {
    color: var(--color-success);
}

.toggle-status.off {
    color: var(--text-muted);
}

/* Subscription Card */
.subscription-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.subscription-merchant {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.subscription-amount {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.subscription-frequency {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
}

.subscription-details {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.subscription-detail-item {
    display: flex;
    gap: 4px;
}

.subscription-detail-label {
    color: var(--text-muted);
}

/* Transactions Table */
.txn-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.txn-table th {
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.txn-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

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

.txn-table .amount {
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
}

.txn-table .descriptor {
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 12px;
    color: var(--text-secondary);
}

.txn-table .category-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    background-color: var(--bg-light);
    color: var(--text-secondary);
}

.txn-highlight {
    background-color: #fef3c7 !important;
}

.txn-highlight td {
    color: var(--text-primary);
}

/* Callout box */
.callout {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 16px;
    font-size: 13px;
    color: #1e40af;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.callout-icon {
    font-size: 16px;
    flex-shrink: 0;
    line-height: 1;
}

/* Section heading in customer page */
.section-heading {
    font-size: 18px;
    font-weight: 600;
    color: var(--nova-primary);
    margin-bottom: 16px;
    margin-top: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 12px 16px;
    }

    .main-content {
        padding: 16px;
    }

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

    .search-container {
        margin: 24px auto;
        padding: 24px;
    }
}
