@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/font-face.css');

:root {
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg-dark: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.3);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --radius: 16px;
}

.finance-premium-dashboard {
    font-family: 'Vazir', sans-serif;
    color: var(--text-main);
    padding: 20px;
}

/* Header */
.finance-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
}

.finance-header h1 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    color: var(--bg-dark);
}

.finance-header p {
    color: var(--text-muted);
    margin: 5px 0 0 0;
}

.header-date {
    background: var(--bg-dark);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-left: 20px;
}

.stat-card.revenue .stat-icon { background: #dbeafe; color: var(--primary); }
.stat-card.costs .stat-icon { background: #fee2e2; color: var(--danger); }
.stat-card.settlement .stat-icon { background: #d1fae5; color: var(--success); }
.stat-card.net .stat-icon { background: #fef3c7; color: var(--warning); }

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.stat-content h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
}

.stat-content small {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
}

/* Navigation */
.finance-nav {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.nav-btn {
    background: #e2e8f0;
    border: none;
    padding: 12px 25px;
    border-radius: 12px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-btn i { margin-left:8px; }

.nav-btn.active {
    background: var(--bg-dark);
    color: white;
    box-shadow: 0 10px 15px rgba(15, 23, 42, 0.2);
}

/* Glass Panes */
.glass-pane {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.pane-header {
    margin-bottom: 25px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 15px;
}

.pane-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

/* Forms */
.premium-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    align-items: flex-end;
}

.p-input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    transition: border 0.3s ease;
}

.p-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.p-btn-glow {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.39);
    transition: all 0.3s ease;
}

.p-btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.23);
}

.p-btn-o {
    background: transparent;
    border: 2px solid var(--bg-dark);
    color: var(--bg-dark);
    padding: 8px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

/* Tables */
.premium-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.premium-table th {
    padding: 15px;
    text-align: right;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 2px solid #f1f5f9;
}

.premium-table tbody tr {
    background: white;
    transition: transform 0.2s ease;
}

.premium-table tbody td {
    padding: 15px;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

.premium-table tbody td:first-child { border-right: 1px solid #f1f5f9; border-radius: 0 12px 12px 0; }
.premium-table tbody td:last-child { border-left: 1px solid #f1f5f9; border-radius: 12px 0 0 12px; }

/* Accounts UI */
.accounts-manager {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
}

.methods-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.method-item {
    background: #f8fafc;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.method-item:hover, .method-item.active {
    background: var(--bg-dark);
    color: white;
}

.accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.account-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    border-right: 5px solid var(--primary);
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    position: relative;
}

.account-card h4 { margin: 0 0 8px 0; font-size: 1.1rem; }
.account-card .meta { font-size: 0.85rem; color: var(--text-muted); }

/* Modals */
.p-modal {
    display: none;
    position: fixed;
    top:0; left:0; width:100%; height:100%;
    background: rgba(15, 23, 42, 0.6);
    z-index: 10000;
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.p-modal-content {
    width: 450px;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } }

.close-modal {
    background: none; border:none; font-size: 1.5rem; cursor: pointer;
}

.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeIn 0.4s ease; }

@keyframes fadeIn { from { opacity: 0; } }

.alert-premium-info {
    background: #e0f2fe;
    color: #0369a1;
    padding: 15px 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid #bae6fd;
}
