/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-light);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== LOGIN PAGE ===== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-text {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-light);
}

.btn-block {
    width: 100%;
}

.btn-large {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.login-footer {
    text-align: center;
    margin-top: 16px;
}

.link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}

.link:hover {
    text-decoration: underline;
}

.demo-credentials {
    margin-top: 24px;
    padding: 16px;
    background-color: var(--bg-light);
    border-radius: 8px;
    text-align: center;
}

.demo-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.demo-text {
    font-size: 14px;
    color: var(--text-primary);
}

/* ===== DASHBOARD PAGE ===== */
.dashboard-page {
    background-color: var(--bg-light);
    min-height: 100vh;
}

.header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo-section .logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.vendor-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.dashboard-main {
    padding: 32px 24px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ===== STATUS CARD ===== */
.status-card {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-md);
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px;
}

.status-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.status-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-inactive {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-active {
    background-color: #d1fae5;
    color: #065f46;
}

.status-reason {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

/* ===== ACTION CARD ===== */
.action-card {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 2px solid #fed7aa;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-md);
}

.action-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #9a3412;
    margin-bottom: 12px;
}

.action-message {
    color: #7c2d12;
    font-size: 15px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.action-details {
    background: var(--white);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row.highlight {
    background-color: #fef3c7;
    padding: 12px 16px;
    margin: 8px -16px;
    border-radius: 6px;
    border-bottom: none;
}

.detail-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

.detail-value.amount {
    font-size: 20px;
    color: #b45309;
}

/* ===== ALERT ===== */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 15px;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

/* ===== DASHBOARD GRID ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 36px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-light);
    border-radius: 12px;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.modal.show {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--white);
    border-radius: 16px;
    max-width: 550px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.modal-close:hover {
    background-color: var(--bg-light);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.invoice-summary {
    background-color: var(--bg-light);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.invoice-summary h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.invoice-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.invoice-row.total {
    padding-top: 16px;
    margin-top: 12px;
    border-top: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--text-primary);
}

.amount-large {
    font-size: 24px;
    color: var(--primary-color);
    font-weight: 700;
}

.payment-methods {
    margin-bottom: 24px;
}

.payment-methods h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.payment-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.payment-option {
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-option:hover {
    border-color: var(--primary-color);
    background-color: #f5f3ff;
}

.payment-option.active {
    border-color: var(--primary-color);
    background-color: #f5f3ff;
}

.payment-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.payment-option span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.demo-notice {
    background-color: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 16px;
}

.demo-notice p {
    font-size: 14px;
    color: #78350f;
    line-height: 1.5;
    margin: 0;
}

/* ===== PROCESSING OVERLAY ===== */
.processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.processing-content {
    text-align: center;
    color: var(--white);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.processing-content p {
    font-size: 16px;
    font-weight: 500;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .login-card {
        padding: 32px 24px;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .vendor-name {
        font-size: 14px;
    }
    
    .dashboard-main {
        padding: 20px 16px;
    }
    
    .status-card,
    .action-card {
        padding: 20px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .payment-options {
        grid-template-columns: 1fr;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    .detail-value.amount {
        font-size: 18px;
    }
    
    .amount-large {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 24px;
    }
    
    .logo-section .logo-text {
        font-size: 18px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .stat-icon {
        font-size: 32px;
        width: 50px;
        height: 50px;
    }
}

/* ===== UTILITY CLASSES ===== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}
