/* assets/css/style.css - Anjali Mobile Stylesheet */

:root {
    --primary-color: #1a4f8b;
    --primary-hover: #133a68;
    --accent-color: #f39c12;
    --dark-bg: #1e293b;
    --light-bg: #f8fafc;
    --border-color: #e2e8f0;
    --text-main: #334155;
    --finance-badge: #7c3aed;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-main);
    min-height: 100vh;
}

/* Navbar & Sidebar */
.navbar-brand {
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sidebar {
    min-height: calc(100vh - 56px);
    background: #0f172a;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
}

.sidebar .nav-link {
    color: #94a3b8;
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-radius: 6px;
    margin: 2px 8px;
    transition: all 0.2s ease;
}

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

.sidebar .nav-link.active {
    color: #ffffff;
    background: var(--primary-color);
}

.btn-xs {
    padding: 0.2rem 0.45rem !important;
    font-size: 0.78rem !important;
    border-radius: 5px !important;
}

/* Dashboard Cards */
.stat-card {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

/* Badges */
.badge-finance {
    background-color: #7c3aed !important;
    color: #fff !important;
}

.badge-cash {
    background-color: #10b981 !important;
    color: #fff !important;
}

.badge-upi {
    background-color: #0284c7 !important;
    color: #fff !important;
}

.badge-card {
    background-color: #d97706 !important;
    color: #fff !important;
}

/* Form Styles */
.form-label {
    font-weight: 600;
    font-size: 0.88rem;
    color: #475569;
    margin-bottom: 4px;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    padding: 0.6rem 0.85rem;
    font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 79, 139, 0.15);
}

.card-form-section {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.card-form-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.finance-box-highlight {
    background: #fdf4ff;
    border: 1.5px solid #d946ef;
    border-radius: 10px;
    padding: 1.25rem;
}

/* ==========================================================================
   PRINT INVOICE STYLING (MATCHING SCREENSHOT 1 & SCREENSHOT 2)
   ========================================================================== */
.bill-paper-container {
    background: #525659;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.bill-slip {
    background: #ffffff;
    width: 210mm; /* A4 width */
    min-height: 148mm; /* Half A4 (A5 landscape or portrait) */
    padding: 18px 24px;
    margin: 0 auto;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    box-sizing: border-box;
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 1.35;
    position: relative;
    border: 2px solid #000;
}

.bill-top-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: bold;
    border-bottom: 1px solid #333;
    padding-bottom: 4px;
    margin-bottom: 6px;
}

.bill-title-header {
    text-align: center;
    margin-bottom: 6px;
}

.bill-invoice-type {
    display: inline-block;
    border: 1.5px solid #000;
    padding: 1px 12px;
    font-weight: bold;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.bill-shop-name {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #000;
    margin: 0;
    line-height: 1.1;
}

.bill-shop-subline {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 2px;
}

.bill-shop-address {
    font-size: 12px;
    margin-top: 2px;
    font-weight: 600;
}

/* Brands strip as in Screenshot 1 */
.brands-strip {
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    padding: 3px 0;
    margin: 6px 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.5px;
    background: #fdfdfd;
}

/* Customer & Bill Meta Box */
.bill-meta-box {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 13px;
}

.customer-info-side {
    width: 65%;
}

.bill-info-side {
    width: 35%;
    text-align: right;
}

.dotted-line-field {
    border-bottom: 1px dotted #333;
    display: inline-block;
    padding: 0 4px;
    min-width: 120px;
    font-weight: 600;
}

/* Table matching Screenshot 2 */
.bill-table {
    width: 100%;
    border-collapse: collapse;
    border: 1.5px solid #000;
    margin-bottom: 6px;
}

.bill-table th {
    border: 1px solid #000;
    padding: 4px 6px;
    background: #f0f0f0;
    font-weight: bold;
    text-align: center;
    font-size: 12px;
    text-transform: uppercase;
}

.bill-table td {
    border: 1px solid #000;
    padding: 4px 6px;
    vertical-align: top;
    font-size: 12.5px;
}

.particulars-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.particulars-list li {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    border-bottom: 1px dotted #bbb;
    font-size: 12.5px;
}

.particulars-list li:last-child {
    border-bottom: none;
}

.particular-label {
    font-weight: 700;
    width: 130px;
    color: #222;
}

.particular-val {
    flex-grow: 1;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Finance Details Box in Print */
.finance-print-box {
    border: 1.5px solid #000;
    background: #fafafa;
    padding: 4px 8px;
    margin: 6px 0;
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
}

.finance-print-title {
    font-weight: bold;
    text-decoration: underline;
    margin-bottom: 2px;
}

/* Terms & Footer */
.bill-footer-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 6px;
    padding-top: 4px;
}

.terms-side {
    width: 55%;
    font-size: 10.5px;
    line-height: 1.3;
}

.terms-side h6 {
    margin: 0 0 2px 0;
    font-size: 11px;
    font-weight: bold;
    text-decoration: underline;
}

.totals-side {
    width: 42%;
}

.totals-side table {
    width: 100%;
    border-collapse: collapse;
}

.totals-side td {
    border: 1px solid #000;
    padding: 3px 6px;
    font-size: 12px;
}

.amount-words-strip {
    border: 1px dashed #000;
    padding: 4px 8px;
    margin: 6px 0;
    font-size: 12px;
    font-weight: 600;
    background: #fafafa;
}

.signatures-strip {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 25px;
    padding-top: 5px;
}

.sign-box {
    text-align: center;
    min-width: 150px;
    border-top: 1px solid #000;
    padding-top: 4px;
    font-size: 11.5px;
    font-weight: bold;
}

/* Print Specific Rules */
@media print {
    body {
        background: transparent !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .no-print {
        display: none !important;
    }

    .bill-paper-container {
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .bill-slip {
        width: 100% !important;
        box-shadow: none !important;
        border: 2px solid #000 !important;
        margin: 0 !important;
        page-break-after: avoid;
        page-break-inside: avoid;
    }

    @page {
        margin: 6mm;
        size: auto;
    }
}
