/* Job-Creation Loan System — RTL Styles */

:root {
    --color-primary: #0d6e91;
    --color-primary-dark: #0a556f;
    --color-accent: #14b8a6;
    --color-bg: #f4f7fa;
    --color-surface: #ffffff;
    --color-text: #1e293b;
    --color-muted: #64748b;
    --color-border: #e2e8f0;
    --color-success: #059669;
    --color-warning: #d97706;
    --color-danger: #dc2626;
    --color-info: #0284c7;
    --radius: 10px;
    --shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
    --font: Tahoma, 'Segoe UI', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; }

body {
    margin: 0;
    font-family: var(--font);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.main-content {
    flex: 1;
    padding: 2rem 1.25rem;
}

/* Navbar */
.navbar {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    gap: 1rem;
}

.brand {
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-primary);
    text-decoration: none;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--color-text);
    font-size: 0.9rem;
    text-decoration: none;
}

.nav-links a:hover { color: var(--color-primary); }

.nav-user {
    font-size: 0.85rem;
    color: var(--color-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.25rem;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
.btn-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    text-decoration: none;
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.btn-outline:hover {
    background: var(--color-primary);
    color: #fff;
    text-decoration: none;
}

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* Forms */
.form-group { margin-bottom: 1.1rem; }
.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--color-surface);
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(13, 110, 145, 0.15);
}

.form-hint {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: var(--color-muted);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.form-actions { margin-top: 1.5rem; }
.form-actions-split {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.form-section-title {
    font-size: 1rem;
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 0.5rem;
    margin: 1.5rem 0 1rem;
}

.flex-grow { flex: 1; }
.form-group-action { align-self: end; }

/* Cards */
.card {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    background: #fafbfc;
}

.card-header h2 {
    margin: 0;
    font-size: 1.05rem;
}

.card-body { padding: 1.25rem; }

/* Alerts */
.alert {
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-gray { background: #f1f5f9; color: #475569; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1d4ed8; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger { background: #fee2e2; color: #991b1b; }

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table th,
.table td {
    padding: 0.75rem 0.85rem;
    text-align: right;
    border-bottom: 1px solid var(--color-border);
}

.table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--color-muted);
    font-size: 0.82rem;
}

.table-compact th,
.table-compact td { padding: 0.5rem 0.65rem; }

/* Stats */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dashboard-grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.stat-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.stat-label { font-size: 0.82rem; color: var(--color-muted); }
.stat-value { font-size: 1.4rem; font-weight: 700; color: var(--color-primary); }

.stat-warning .stat-value { color: var(--color-warning); }
.stat-info .stat-value { color: var(--color-info); }
.stat-success .stat-value { color: var(--color-success); }
.stat-danger .stat-value { color: var(--color-danger); }

/* Page header */
.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1 {
    margin: 0 0 0.35rem;
    font-size: 1.5rem;
}

.page-header p {
    margin: 0;
    color: var(--color-muted);
}

/* Detail list */
.detail-list {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.5rem 1rem;
    margin: 0;
}

.detail-list dt {
    font-weight: 600;
    color: var(--color-muted);
    font-size: 0.85rem;
}

.detail-list dd {
    margin: 0;
    font-size: 0.9rem;
}

/* Timeline */
.timeline {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline li {
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.timeline-action { font-weight: 600; font-size: 0.9rem; }
.timeline-date { font-size: 0.8rem; color: var(--color-muted); margin-right: auto; }

/* Steps */
.steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.steps-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--color-border);
}

.steps-list li.active strong { color: var(--color-primary); }
.steps-list li.done strong { color: var(--color-success); }

/* Hero (home) */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
    padding: 4rem 1.25rem;
    text-align: center;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.hero h1 { margin: 0 0 0.5rem; font-size: 2rem; }
.hero-subtitle { font-size: 1.1rem; opacity: 0.9; margin: 0 0 0.75rem; }
.hero-desc { opacity: 0.85; margin-bottom: 1.75rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-actions .btn-outline { color: #fff; border-color: #fff; }
.hero-actions .btn-outline:hover { background: #fff; color: var(--color-primary); }

.features { margin-bottom: 2rem; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.feature-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
 justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0 auto 1rem;
}

.feature-card h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.feature-card p { margin: 0; color: var(--color-muted); font-size: 0.9rem; }

/* Auth pages */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
    padding: 2rem 0;
}

.auth-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    width: 100%;
    max-width: 480px;
}

.install-card { max-width: 640px; }

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-header h1 { margin: 0 0 0.35rem; font-size: 1.4rem; }
.auth-header p { margin: 0; color: var(--color-muted); font-size: 0.9rem; }

.auth-footer {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: var(--color-muted);
}

/* Grid layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--color-muted); font-size: 0.9rem; }

.error-page {
    text-align: center;
    padding: 4rem 1rem;
}

.error-page h1 { font-size: 4rem; margin: 0; color: var(--color-primary); }

/* Footer */
.footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 1.25rem 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-muted);
}

.footer p { margin: 0; }

/* Filter form */
.filter-form .form-row { align-items: end; }

/* Responsive */
@media (max-width: 640px) {
    .nav-inner { flex-direction: column; align-items: flex-start; padding: 0.75rem 0; }
    .detail-list { grid-template-columns: 1fr; }
    .hero h1 { font-size: 1.5rem; }
    .form-actions-split { flex-direction: column; }
    .form-actions-split .btn { width: 100%; }
}
