/* SNP Manpower & Job Services - Custom Stylesheet */
:root {
    --primary-color: #1e3a8a;
    --primary-hover: #172554;
    --accent-color: #0d9488;
    --accent-hover: #0f766e;
    --secondary-color: #475569;
    --dark-bg: #0f172a;
    --light-bg: #f8fafc;
    --card-border: #e2e8f0;
    --success-color: #16a34a;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --form-border-color: #991b1b; /* Classic physical red/maroon application line */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    font-family: var(--font-sans);
    background-color: #e2e8f0;
    color: #1e293b;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

/* Navbar */
.navbar-brand-custom {
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--primary-color) !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-badge {
    background: linear-gradient(135deg, #1e3a8a, #0d9488);
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    display: inline-block;
    box-shadow: 0 4px 6px -1px rgba(30, 58, 138, 0.2);
}

.navbar-custom {
    background: #ffffff;
    border-bottom: 1px solid var(--card-border);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.nav-link {
    font-weight: 500;
    color: #475569;
    transition: all 0.2s ease;
    padding: 0.5rem 0.9rem !important;
    border-radius: 6px;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
    background-color: #f1f5f9;
}

/* Simulation Banner */
.simulation-banner {
    background: #fef3c7;
    border-bottom: 1px solid #fde68a;
    color: #92400e;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 6px 15px;
    text-align: center;
}

/* Stat Cards */
.stat-card {
    border-radius: 12px;
    padding: 1.25rem;
    background: #ffffff;
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

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

.stat-icon.blue { background-color: #dbeafe; color: #1d4ed8; }
.stat-icon.green { background-color: #dcfce7; color: #15803d; }
.stat-icon.amber { background-color: #fef3c7; color: #b45309; }
.stat-icon.purple { background-color: #f3e8ff; color: #7e22ce; }

.stat-value {
    font-size: 1.65rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

/* Status Badges */
.badge-status-paid {
    background-color: #dcfce7;
    color: #166534;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}

.badge-status-pending {
    background-color: #fef3c7;
    color: #92400e;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}

.badge-status-partial {
    background-color: #e0f2fe;
    color: #0369a1;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}

/* Custom Buttons */
.btn-primary-custom {
    background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
    border: none;
    color: #ffffff;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(30, 58, 138, 0.2);
    transition: all 0.2s ease;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, #172554, #1e40af);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-accent-custom {
    background: linear-gradient(135deg, #0d9488, #059669);
    border: none;
    color: #ffffff;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(13, 148, 136, 0.2);
    transition: all 0.2s ease;
}

/* Cards & Surfaces */
.card-custom {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
}

.card-custom-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--card-border);
    padding: 1rem 1.25rem;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    font-weight: 700;
    color: #0f172a;
}

/* OTP Digits Input Box */
.otp-input-field {
    letter-spacing: 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    max-width: 280px;
    margin: 0 auto;
}

/* ==========================================================================
   PHYSICAL JOB APPLICATION FORM REPLICATION STYLING (MATCHES SCREENSHOTS)
   ========================================================================== */

.physical-form-wrapper {
    max-width: 920px;
    margin: 0 auto;
}

.physical-sheet {
    background: #ffffff;
    border: 2px solid #881337;
    padding: 24px 28px;
    margin-bottom: 35px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    position: relative;
    font-family: 'Inter', -apple-system, sans-serif;
}

/* Spiritual Header Banner */
.spiritual-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #881337;
    margin-bottom: 4px;
}

.spiritual-sun {
    color: #ea580c;
    font-size: 1.25rem;
}

/* Sheet Brand Header */
.sheet-main-header {
    border-bottom: 2px solid #881337;
    padding-bottom: 8px;
    margin-bottom: 12px;
    text-align: center;
}

.sheet-title-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.sheet-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: radial-gradient(circle, #ea580c, #0284c7, #16a34a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
    font-size: 1.2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.sheet-company-name {
    font-size: 1.35rem;
    font-weight: 900;
    color: #1e3a8a;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 0;
}

.sheet-contact-line {
    font-size: 0.76rem;
    font-weight: 700;
    color: #334155;
    margin-top: 2px;
    letter-spacing: 0.2px;
}

.sheet-highlight-banner {
    background: #0f172a;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 4px 8px;
    margin-top: 5px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Application Form Title Bar */
.form-title-bar {
    border: 2px solid #881337;
    background: #fff1f2;
    color: #881337;
    text-align: center;
    padding: 6px;
    margin-bottom: 12px;
}

.form-title-kannada {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 1px;
}

.form-title-english {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Top Meta Row (Photo, Date, State, Reg, Mobile, Police Verification) */
.form-meta-container {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.photo-affix-box {
    width: 135px;
    min-width: 135px;
    height: 165px;
    border: 2px dashed #991b1b;
    background: #fffaf0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 6px;
}

.photo-affix-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.photo-affix-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #991b1b;
    text-transform: uppercase;
    line-height: 1.2;
}

.meta-grid-table {
    flex: 1;
    border: 1px solid #881337;
    border-collapse: collapse;
    width: 100%;
}

.meta-grid-table td, .meta-grid-table th {
    border: 1px solid #881337;
    padding: 4px 8px;
    font-size: 0.8rem;
    vertical-align: middle;
}

.meta-cell-label {
    background: #fdf2f8;
    color: #881337;
    font-weight: 700;
    font-size: 0.75rem;
}

/* Physical Grid Table */
.physical-table {
    width: 100%;
    border-collapse: collapse;
    border: 2px solid #881337;
    margin-bottom: 14px;
}

.physical-table td, .physical-table th {
    border: 1px solid #881337;
    padding: 4px 8px;
    font-size: 0.82rem;
    vertical-align: middle;
}

.field-label-cell {
    background: #fff5f5;
    color: #1e293b;
    width: 32%;
    font-weight: 600;
}

.field-label-kannada {
    font-weight: 800;
    color: #881337;
    font-size: 0.85rem;
    display: block;
    line-height: 1.2;
}

.field-label-english {
    font-weight: 700;
    color: #1e3a8a;
    font-size: 0.78rem;
    display: block;
}

.field-input-cell {
    background: #ffffff;
    width: 68%;
    padding: 2px 6px;
}

/* Borderless Form Inputs inside Physical Table */
.field-input-cell input, 
.field-input-cell select, 
.field-input-cell textarea {
    width: 100%;
    border: 1px solid transparent;
    padding: 4px 6px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
    text-transform: uppercase;
    background: transparent;
    border-radius: 4px;
}

.field-input-cell input:focus, 
.field-input-cell select:focus, 
.field-input-cell textarea:focus {
    outline: none;
    background-color: #f0fdf4;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.field-input-cell textarea {
    resize: vertical;
    text-transform: uppercase;
}

/* Boxed Segment Inputs (DOB, PAN, Aadhaar, Vehicle) */
.char-boxes-row {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
}

.char-box-item {
    width: 28px;
    height: 32px;
    border: 1px solid #881337;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0;
    background: #ffffff;
}

.char-box-sep {
    font-weight: bold;
    color: #881337;
    margin: 0 4px;
}

/* Multi-Item Table Row */
.table-inner-grid {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

/* Family Background 4 Names 4 Mobiles Table */
.family-subtable {
    width: 100%;
    border-collapse: collapse;
}

.family-subtable td {
    border: 1px solid #fecdd3 !important;
    padding: 3px 6px;
}

/* Declaration and Signatures */
.sheet-declaration {
    font-size: 0.78rem;
    font-weight: 600;
    color: #1e293b;
    border-top: 1px solid #881337;
    padding-top: 8px;
    margin-top: 10px;
    margin-bottom: 12px;
}

.sheet-thanking {
    font-size: 0.85rem;
    font-weight: 800;
    color: #881337;
    margin-bottom: 18px;
}

.sheet-signatures-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 30px;
    padding-top: 10px;
}

.signature-block {
    text-align: center;
    width: 220px;
}

.signature-line {
    border-top: 1.5px solid #0f172a;
    padding-top: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Fees Handwritten note highlight */
.fees-highlight-badge {
    background: #fef08a;
    border: 2px dashed #ca8a04;
    padding: 6px 14px;
    font-weight: 800;
    font-size: 1rem;
    color: #854d0e;
    display: inline-block;
    border-radius: 6px;
}

/* ==========================================================================
   PRINT MEDIA OPTIMIZATION (EXACT PHYSICAL 2-PAGE PRINT)
   ========================================================================== */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 11pt !important;
    }
    .no-print, .navbar, footer, .btn, .alert, .simulation-banner {
        display: none !important;
    }
    .physical-form-wrapper {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .physical-sheet {
        border: 2px solid #881337 !important;
        box-shadow: none !important;
        margin-bottom: 0 !important;
        page-break-after: always !important;
        break-after: page !important;
        padding: 15px 20px !important;
    }
    .physical-sheet:last-child {
        page-break-after: avoid !important;
        break-after: avoid !important;
    }
    .field-input-cell input, 
    .field-input-cell select, 
    .field-input-cell textarea {
        border: none !important;
        font-weight: 700 !important;
        color: #000000 !important;
        padding: 0 !important;
    }
    .meta-cell-label {
        background: #fff !important;
    }
    .field-label-cell {
        background: #fff !important;
    }
    @page {
        size: A4 portrait;
        margin: 8mm 8mm 8mm 8mm;
    }
}
