/* Base Styles */
body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: var(--line-height-normal);
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

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

/* Card Styles */
.card {
    background: var(--white);
    border-radius: var(--radius-sm);
    border: none;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    background: var(--white);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--text-dark);
    margin: 0;
}

.card-body {
    padding: var(--spacing-md);
}

/* Stats Card */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.stats-card {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.stats-card:hover {
    box-shadow: var(--shadow-md);
}

.stats-title {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-bottom: var(--spacing-xs);
}

.stats-value {
    font-size: var(--font-size-xl);
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xs);
}

.stats-change {
    font-size: var(--font-size-sm);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.stats-change.positive {
    color: var(--success-color);
}

.stats-change.negative {
    color: var(--error-color);
}

/* Stat item styles (for compatibility with existing templates) */
.stat-item {
    text-align: center;
    padding: var(--spacing-md);
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    font-weight: 500;
}

/* Section Styles */
.section {
    background: var(--white);
    border-radius: var(--radius-sm);
    border: none;
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-lg);
    transition: var(--transition-normal);
}

.section:hover {
    box-shadow: var(--shadow-md);
}

.section-header {
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    background: var(--white);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xs) 0;
}

.section-content {
    padding: var(--spacing-md);
}

/* Form Styles */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xs);
}

.form-control {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    color: var(--text-dark);
    background-color: var(--bg-light);
    transition: var(--transition-normal);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-light);
}

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

.form-select {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-lg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    color: var(--text-dark);
    background-color: var(--bg-light);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%236B7280' d='M4.646 6.146a.5.5 0 0 1 .708 0L8 8.793l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--spacing-md) center;
    padding-right: var(--spacing-xl);
    transition: var(--transition-normal);
}

.form-select:hover {
    border-color: var(--primary-color);
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-light);
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: var(--font-size-sm);
    font-weight: 500;
    border-radius: var(--radius-btn);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

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

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

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

.btn-danger:hover {
    background: var(--error-dark);
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background: var(--bg-lighter);
    transform: translateY(-1px);
}

/* Table Styles */
.table-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition-normal);
}

.table-container:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: var(--font-size-sm);
}

.table th {
    background: var(--bg-lighter);
    font-weight: 600;
    text-align: left;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
}

.table td {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
}

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

.table tbody tr:hover {
    background-color: var(--bg-lighter);
}

/* Page Layout */
.page-container {
    padding: var(--spacing-md);
    max-width: var(--container-width);
    margin: 0 auto;
}

.page-header {
    margin-bottom: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.page-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.page-actions {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-lg);
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--spacing-lg);
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-3xl);
    color: var(--primary-color);
}

.empty-state-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

.empty-state-description {
    color: var(--text-light);
    margin-bottom: var(--spacing-lg);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Top-up Success/Failure Page Styles */
.topup-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
}

.topup-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.topup-icon.success {
    color: #28a745;
}

.topup-icon.error {
    color: #dc3545;
}

.topup-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    text-align: center;
}

.balance-display {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.balance-amount {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.balance-label {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
}

.topup-action-buttons {
    margin-top: 2rem;
}

.topup-btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    color: white;
    text-decoration: none;
    display: inline-block;
    margin: 0.5rem;
    transition: all 0.3s ease;
}

.topup-btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.topup-btn-secondary {
    background: #6c757d;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    color: white;
    text-decoration: none;
    display: inline-block;
    margin: 0.5rem;
    transition: all 0.3s ease;
}

.topup-btn-secondary:hover {
    background: #545b62;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
} 