@font-face {
    font-family: 'Vazir';
    src: url('./Vazir.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazir';
    src: url('./Vazir-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary: #00b894;
    --primary-dark: #00a381;
    --primary-light: #55efc4;
    --secondary: #0984e3;
    --accent: #fdcb6e;
    --success: #00b894;
    --danger: #d63031;
    --bg: #fafbfc;
    --bg-card: #ffffff;
    --bg-card-hover: #f4f5f7;
    --text: #091e42;
    --text-secondary: #42526e;
    --text-muted: #5e6c84;
    --border: #e4e6ea;
    --radius: 16px;
    --shadow: 0 0 40px rgba(47,55,118,0.05);
    --shadow-lg: 0 10px 40px rgba(47,55,118,0.1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Vazir', Tahoma, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    direction: rtl;
    line-height: 1.7;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

.container { max-width: 1190px; margin: 0 auto; padding: 0 24px; }

/* Navbar */
.navbar {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 64px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.navbar--green {
    background: linear-gradient(135deg, #e8fdf5 0%, #d1fadf 100%);
    border-bottom-color: var(--primary);
}

.navbar--green .navbar-brand {
    color: var(--primary-dark);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    flex-shrink: 0;
}

.navbar-brand .logo {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-brand .logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    flex: 1;
    justify-content: center;
    flex-wrap: wrap;
}

.navbar-auth {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.navbar-nav a, .navbar-nav button {
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-family: inherit;
    background: transparent;
}

.navbar-nav a { color: var(--text-muted); }
.navbar-nav a:hover { color: var(--text); background: var(--bg-card-hover); }
.navbar-nav a.active { color: var(--primary); background: rgba(0,184,148,0.08); }

@media (max-width: 768px) {
    .navbar { padding: 0 16px; }
    .navbar-nav { gap: 4px; }
    .navbar-nav a, .navbar-nav button { padding: 6px 12px; font-size: 0.8rem; }
    .navbar-auth { gap: 6px; }
    .navbar-auth .btn-sm { padding: 6px 12px; font-size: 0.75rem; }
}

@media (max-width: 480px) {
    .navbar { flex-wrap: wrap; height: auto; min-height: 64px; padding: 12px 16px; gap: 12px; }
    .navbar-brand { order: 1; }
    .navbar-nav { order: 3; width: 100%; justify-content: center; }
    .navbar-auth { order: 2; }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,184,148,0.35); }

a.btn-primary:hover, a.btn-success:hover, a.btn-danger:hover { color: #fff; }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: var(--primary-dark); transform: translateY(-2px); }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #c0392b; transform: translateY(-2px); }

.btn-outline {
    background: transparent;
    color: var(--text-muted);
    border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: rgba(0,184,148,0.04); }

.btn-ghost { background: transparent; color: var(--danger); }
.btn-ghost:hover { background: rgba(214,48,49,0.08); }

.btn-sm { padding: 7px 16px; font-size: 0.8rem; border-radius: 8px; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; border-radius: 14px; }
.btn-block { width: 100%; }

/* Hero Section */
.hero {
    padding: 100px 24px 80px;
    background: linear-gradient(135deg, #e8fdf5 0%, #f0f9ff 50%, #fef3c7 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0,184,148,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(9,132,227,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,184,148,0.1);
    color: var(--primary-dark);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.3;
}

.hero h1 span {
    color: var(--primary);
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 36px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 48px;
    justify-content: center;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.hero-stat {
    text-align: center;
}

.hero-stat .number {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.hero-stat .label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Features Section */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.section-header p {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px 28px;
    transition: all 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 20px;
    background: rgba(0,184,148,0.1);
    color: var(--primary);
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* How It Works Section */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    position: relative;
}

.step-card {
    text-align: center;
    padding: 24px;
}

.step-number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.step-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.step-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Cards & Forms */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0,184,148,0.12);
}

.form-control::placeholder { color: var(--text-muted); opacity: 0.6; }

.file-input-wrapper {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--bg);
}

.file-input-wrapper:hover { border-color: var(--primary); background: rgba(0,184,148,0.03); }
.file-input-wrapper input[type="file"] { display: none; }
.file-input-wrapper .icon { font-size: 2.5rem; margin-bottom: 12px; display: block; }
.file-input-wrapper .text { color: var(--text-muted); font-size: 0.95rem; }
.file-input-wrapper .hint { color: var(--text-muted); font-size: 0.8rem; margin-top: 8px; opacity: 0.7; }

/* Alerts */
.alert {
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error { background: rgba(214,48,49,0.08); color: #d63031; border: 1px solid rgba(214,48,49,0.15); }
.alert-success { background: rgba(0,184,148,0.08); color: #00a381; border: 1px solid rgba(0,184,148,0.15); }

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

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.75rem;
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-card .stat-number { font-size: 2.5rem; font-weight: 700; color: var(--primary); line-height: 1; }
.stat-card .stat-label { color: var(--text-muted); font-size: 0.9rem; margin-top: 8px; }

/* Files Grid */
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.file-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.file-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }

.file-card .file-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.file-icon.pdf { background: rgba(214,48,49,0.1); }
.file-icon.image { background: rgba(9,132,227,0.1); }

.file-card .file-number {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0,184,148,0.1);
    color: var(--primary-dark);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
    width: fit-content;
}

.file-card .file-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
    flex-grow: 1;
}

.file-card .file-meta span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.file-card .file-actions { margin-top: auto; }

/* Table */
.table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
}

table { width: 100%; border-collapse: collapse; }

th, td {
    padding: 14px 18px;
    text-align: right;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--bg-card);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tr:hover td { background: rgba(0,184,148,0.02); }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-admin { background: rgba(214,48,49,0.1); color: #d63031; }
.badge-user { background: rgba(0,184,148,0.1); color: #00a381; }

/* Auth Pages */
.auth-container {
    max-width: 440px;
    margin: 60px auto;
    padding: 0 24px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px 32px;
    box-shadow: var(--shadow-lg);
}

.auth-card .auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-card .auth-logo img {
    width: 72px;
    height: 72px;
}

.auth-card h1 {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 28px;
}

.auth-links {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-links a { font-weight: 600; }

/* User Chip */
.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-card-hover);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.85rem;
}

.user-chip .avatar {
    width: 28px;
    height: 28px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state .icon { font-size: 3.5rem; margin-bottom: 16px; display: block; }
.empty-state h3 { color: var(--text); margin-bottom: 8px; font-weight: 700; }

/* Page Header */
.page-header {
    text-align: center;
    padding: 48px 0 32px;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.page-header p { color: var(--text-muted); font-size: 1.05rem; }

/* Footer */
.footer {
    background: var(--text);
    color: rgba(255,255,255,0.7);
    padding: 60px 24px 30px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1190px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-links h4 {
    color: white;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    max-width: 1190px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.85rem;
}

/* Form Row */
.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group { flex: 1; }

/* Animations */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 992px) {
    .features-grid, .steps-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-content { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .navbar { padding: 0 16px; }
    .hero { padding: 60px 16px 50px; }
    .hero h1 { font-size: 2rem; }
    .hero-stats { gap: 24px; flex-wrap: wrap; }
    .features-grid, .steps-grid { grid-template-columns: 1fr; }
    .files-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .footer-content { grid-template-columns: 1fr; gap: 28px; }
    .navbar-nav { gap: 4px; }
    .navbar-nav a, .navbar-nav button { padding: 6px 12px; font-size: 0.8rem; }
    .section { padding: 50px 0; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.6rem; }
    .hero-stats { flex-direction: column; gap: 16px; }
    .stats-grid { grid-template-columns: 1fr; }
}
