/* style.css - Modern Design with Estedad Font */

:root {
    --primary-color: #4f46e5;       /* Modern Indigo */
    --primary-hover: #4338ca;
    --bg-gradient-start: #312e81;   /* Deep indigo */
    --bg-gradient-end: #1e1b4b;
    --card-bg: #ffffff;
    --text-main: #1f2937;
}

body {
    font-family: 'Estedad', sans-serif;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.bg-gradient-modern {
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
}

.fw-black {
    font-weight: 900;
}

/* Justified text for content paragraphs and lists */
main p,
main li,
main ol,
main .accordion-body {
    text-align: justify;
    text-justify: inter-word;
}

/* Tab Navigation Customizations */
.nav-pills .nav-link {
    color: rgba(255, 255, 255, 0.75);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.nav-pills .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.08);
}

.nav-pills .nav-link.active {
    background-color: var(--primary-color) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.35);
}

/* Modern Card Styling */
.custom-card {
    background-color: var(--card-bg);
    border-radius: 24px;
    border: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: blur(10px);
}

/* Inputs & Selects */
.custom-input {
    border-radius: 14px;
    border: 2px solid #e5e7eb;
    padding: 0.85rem 1.2rem;
    font-size: 1.05rem;
    background-color: #f9fafb;
    color: var(--text-main);
    transition: all 0.3s ease;
}

.custom-input:focus {
    background-color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}

/* Buttons */
.custom-btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 14px;
    padding: 1rem;
    transition: all 0.2s ease-in-out;
}

.custom-btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
}

.custom-btn-primary:active {
    transform: translateY(0);
}

.custom-btn-secondary {
    border-radius: 14px;
    border: 2px solid #e5e7eb;
    color: #4b5563;
    font-weight: 600;
}

.custom-btn-secondary:hover {
    background-color: #f3f4f6;
}

.custom-btn-outline {
    border-radius: 14px;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    transition: all 0.2s ease;
}

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

.btn-copied {
    background-color: #10b981 !important; /* Emerald green */
    border-color: #10b981 !important;
    color: white !important;
}

.custom-alert {
    border-radius: 16px;
    border: none;
    background-color: #fee2e2;
    color: #991b1b;
    font-weight: 600;
}

/* Custom styles for captured image/PDF buttons */
.custom-btn-outline-success {
    border-radius: 14px;
    border: 2px solid #10b981;
    color: #10b981;
    transition: all 0.2s ease;
}

.custom-btn-outline-success:hover {
    background-color: #10b981;
    color: white;
}

/* ==========================================================================
   Branded Invoice Templates (used for html2canvas screenshot capture)
   ========================================================================== */
.invoice-template {
    position: fixed;
    top: 0;
    left: -9999px;
    width: 620px;
    background: #ffffff;
    color: #111827;
    font-family: 'Estedad', 'Vazirmatn', sans-serif;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.invoice-header {
    position: relative;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #2563eb 100%);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ffffff;
    overflow: hidden;
}

.invoice-header::before {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    top: -90px;
    left: -60px;
}

.invoice-header::after {
    content: '';
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    bottom: -60px;
    right: 180px;
}

.invoice-brand {
    position: relative;
    display: flex;
    align-items: center;
}

.invoice-logo {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 900;
    margin-left: 14px;
}

.invoice-brand-name {
    font-size: 20px;
    font-weight: 800;
}

.invoice-brand-tag {
    font-size: 12px;
    opacity: 0.85;
    margin-top: 2px;
}

.invoice-site {
    position: relative;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 9px 20px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 15px;
}

.invoice-body {
    padding: 26px 32px;
}

.invoice-title {
    text-align: center;
    font-size: 20px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 18px;
}

.invoice-meta {
    display: flex;
    justify-content: space-between;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    padding: 11px 16px;
    border-radius: 12px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 20px;
}

.invoice-meta b {
    color: #111827;
    font-weight: 700;
}

.invoice-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 4px;
    border-bottom: 1px dashed #e5e7eb;
    font-size: 15px;
}

.invoice-row span {
    color: #6b7280;
}

.invoice-row b {
    color: #111827;
    font-weight: 700;
}

.invoice-danger {
    color: #dc2626 !important;
}

.invoice-total {
    margin-top: 20px;
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: 16px;
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.invoice-total span {
    color: #4f46e5;
    font-weight: 800;
    font-size: 15px;
}

.invoice-total b {
    color: #4f46e5;
    font-size: 21px;
    font-weight: 900;
}

.invoice-footer {
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    padding: 15px 32px;
    text-align: center;
    font-size: 12.5px;
    color: #6b7280;
}

.invoice-footer b {
    color: #4f46e5;
}

.invoice-footer-site {
    margin-top: 3px;
    font-weight: 800;
    color: #111827;
}

/* ==========================================================================
   Mobile Responsive Adjustments (Media Queries)
   ========================================================================== */
@media (max-width: 576px) {
    .nav-pills {
        flex-direction: column;
    }
    .nav-pills .nav-link {
        font-size: 0.95rem;
        padding: 0.8rem 1rem !important;
    }
    .custom-card {
        padding: 1.5rem !important;
        border-radius: 20px;
    }
    .custom-input {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    /* Typography compression on mobile viewports */
    h1 {
        font-size: 1.8rem !important;
    }
    p.opacity-75 {
        font-size: 1rem !important;
    }
    .fs-3 {
        font-size: 1.45rem !important;
    }
    .fs-5 {
        font-size: 1.1rem !important;
    }
}
