:root {
    --primary-color: #007bff;
    --secondary-color: #073F7B;
    --bg-light: #f4f4f4;
    --text-main: #000000;
    --text-muted: #4a5568;
    --border-color: #edf2f7;
    --danger-color: #e53e3e;
    --success-color: #1BB262;
    --footer-border: #ACEDC6;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    /* background-color: var(--bg-light); */
}

/* --- Header --- */
.site-header {
    background-color: white;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 900;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo img {
    height: 40px;
    display: block;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.header-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

.header-nav a {
    text-decoration: none;
    color: var(--text-main);
    /* font-weight: 500; */
    font-size: 14px;
}

.header-nav a:hover {
    color: var(--secondary-color);
}

.header-actions {
    margin-left: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.btn-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--secondary-color);
    border-radius: 2px;
    transition: all 0.2s ease;
}

/* Mobile nav open state */
.header-nav.nav-open {
    display: block;
    width: 100%;
    order: 3;
    flex-basis: 100%;
    background: white;
    padding: 12px 0 4px;
}

.header-nav.nav-open ul {
    flex-direction: column;
    gap: 0;
}

.header-nav.nav-open ul li a {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
}

/* --- Components --- */

/* Buttons */
.btn {
    padding: 8px 20px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

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

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 14px;
}

.btn-success:hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
}

.btn-ghost {
    background-color: #e2e8f0;
    color: var(--text-muted);
}

.btn-icon {
    background: none;
    padding: 4px 8px;
    opacity: 0;
    /* Hidden by default for table actions */
}

.btn-icon-edit {
    color: var(--secondary-color);
}

.btn-icon-delete {
    color: var(--danger-color);
}

.btn-icon-save {
    color: #38a169;
    opacity: 1;
}

.btn-icon-cancel {
    color: var(--danger-color);
    opacity: 1;
}

.btn-icon:hover {
    text-decoration: underline;
}

.btn-close {
    background: #FFF1C4;
    color: var(--secondary-color);
    width: 22px;
    height: 22px;
    font-size: 12px;
    margin-right: 15px;
    padding: 0;
}

.btn-link {
    background: none;
    color: var(--secondary-color);
    padding: 0;
    text-decoration: none;
    font-size: 14px;
    margin-top: 5px;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Cards / Sections */
.section {
    margin-bottom: 20px;
}

.section-title {
    background-color: #ECECEC;
    padding: 8px 12px;
    font-size: 16px;
    font-weight: 300;
    margin: 0 0 15px 0;
    border-radius: 4px;
    flex-grow: 1;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.section-header .section-title {
    margin-bottom: 0;
}

.section-header .btn-icon {
    opacity: 1;
    /* Always show edit button for sections */
    margin-left: 10px;
}

/* Badges */
.badge {
    background-color: #c6f6d5;
    color: #22543d;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
}

.badge-danger {
    background-color: #FED7D7;
    color: #822727;
}

/* Typography Utilities */
.value.text-lg {
    font-size: 16px;
}

/*  */

.flex-align-center {
    display: flex;
    align-items: center;
}

.w-auto {
    width: auto;
}

.ml-lg {
    margin-left: 40px;
}

.main-actions {
    padding: 20px;
    display: flex;
    gap: 10px;
    min-height: 40vh;
    align-items: baseline;
}

/* Forms */
.form-control {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

textarea.form-control {
    resize: vertical;
}

/* Layout Utilities */
.label {
    color: var(--text-muted);
    font-size: 14px;
}

.label-cell {
    color: var(--text-muted);
    font-size: 14px;
    width: 160px;
    min-width: 160px;
}

.value-cell {
    flex-grow: 1;
}

.value {
    color: var(--text-main);
    font-size: 14px;
}

.field-edit-btn {
    padding: 0 8px !important;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.table tr:hover .field-edit-btn,
.table tr:hover .btn-icon,
.flex-row:hover .btn-icon {
    opacity: 1;
}

/* Tables */
.table-container {
    padding: 0 12px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.table td {
    padding: 8px 0;
    font-size: 14px;
    vertical-align: top;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
}

.table td:first-child {
    width: 160px;
    min-width: 160px;
    color: var(--text-muted);
}

/* Specifically fix width for the 'Role' column in the 3-data-column Officers table */
#officers-table td:nth-child(2) {
    width: 140px;
    min-width: 140px;
}

.flex-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
}

.table td:not(:first-child) {
    padding-left: 10px;
}

.actions-cell {
    text-align: right;
    white-space: nowrap;
}

/* --- Footer --- */
.site-footer {
    /* background-color: #f9f9f9; */
    margin-top: 50px;
    position: relative;
}

.footer-top-border {
    height: 4px;
    background-color: var(--footer-border);
    width: 100%;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 40px;
    display: flex;
    gap: 80px;
}

.footer-column {
    flex: 1;
}

.description-col {
    max-width: 380px;
}

.footer-logo img {
    height: 40px;
    margin-bottom: 25px;
}

.footer-description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-main);
    margin: 0;
}

.footer-column h3 {
    font-size: 20px;
    font-weight: 400;
    margin: 0 0 25px 0;
    color: var(--text-main);
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin-bottom: 6px;
}

.footer-column a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 14px;
    transition: color 0.2s;
}

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

.footer-bottom {
    background-color: var(--secondary-color);
    color: white;
    padding: 25px 0;
}

.footer-bottom-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.copyright {
    font-size: 14px;
    font-weight: 400;
}

.footer-legal-nav {
    display: flex;
    gap: 10px;
}

.footer-legal-nav a {
    color: white;
    text-decoration: none;
    font-size: 14px;
}

.footer-legal-nav a:hover {
    text-decoration: underline;
}

/* Off-canvas Shell */
.off-canvas {
    position: fixed;
    top: 0;
    right: -100%;
    width: 750px;
    height: 100%;
    background-color: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease-in-out;
    z-index: 1000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.off-canvas.active {
    right: 0;
}

.off-canvas-header {
    padding: 20px;
    display: flex;
    align-items: center;
    /* border-bottom: 1px solid #eee; */
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.off-canvas-body {
    padding: 20px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 999;
}

.overlay.active {
    display: block;
}

.company-name {
    margin: 0;
    font-size: 20px;
    font-weight: 300;
    flex-grow: 1;
}

/* Component Modifiers */
.stack-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.row-editing td {
    padding: 12px 0;
}

/* --- Hero Section --- */
.hero-main {
    /* background-color: #f0f2f5; */
    padding: 80px 0;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.hero-content-left {
    flex: 1;
    position: sticky;
    top: 62px;
    align-self: flex-start;
    padding-top: 60px;
}

.hero-content-right {
    flex: 1;
    padding: 10px 0;
}

.hero-headline {
    color: var(--secondary-color);
    font-size: 36px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 24px 0;
}

.hero-subtext {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-main);
    margin: 0 0 20px 0;
}

.support-section {
    margin-top: 20px;
}

.support-heading {
    color: var(--secondary-color);
    font-size: 24px;
    font-weight: 500;
    margin: 0 0 20px 0;
}

.btn-lg {
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 6px;
}

.filing-form-card {
    display: flex;
    flex-direction: column;
    background-color: #F6F9FB;
    border-radius: 25px;
    box-shadow: 0 0 24px rgba(0, 0, 0, 15%);
    padding: 40px;
}

.form-card-title {
    color: var(--secondary-color);
    font-size: 28px;
    font-weight: 500;
    margin: 0 0 24px 0;
}

.form-card-subtitle {
    color: var(--success-color);
    font-size: 18px;
    font-weight: 500;
    margin: 0 0 20px 0;
}

.filing-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.form-label {
    color: var(--secondary-color);
    font-size: 13px;
    font-weight: 500;
}

.form-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input-wrapper .form-input-field {
    padding-right: 44px;
}

.form-input-icon {
    position: absolute;
    right: 14px;
    color: var(--secondary-color);
    opacity: 0.6;
    font-size: 15px;
    pointer-events: none;
}

.form-input-field {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background-color: white;
    font-size: 14px;
    color: var(--secondary-color);
    box-sizing: border-box;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.form-input-field::placeholder {
    color: var(--secondary-color);
    opacity: 0.65;
}

.form-input-field:focus {
    outline: none;
    border-color: var(--success-color);
}

select.form-input-field {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23073F7B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.form-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
}

.step-indicator {
    color: var(--secondary-color);
    font-size: 15px;
    /* font-weight: 500; */
}

.btn-next {
    padding: 10px 36px;
    font-size: 16px;
    border-radius: 6px;
}

/* Multi-step form */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

/* Previous button */
.btn-prev {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    padding: 10px 0;
}

.btn-prev:hover {
    text-decoration: underline;
}

.footer-nav-btns {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Officer cards */
.officer-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 14px;
}

.officer-card {
    background: white;
    border-radius: 10px;
    border-left: 3px solid var(--success-color);
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.officer-name {
    color: var(--secondary-color);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.officer-meta {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.officer-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    opacity: 1;
}

.officer-actions .btn-icon {
    opacity: 1;
}

.add-officer-link {
    display: inline-block;
    margin-top: 4px;
    font-size: 14px;
    color: var(--secondary-color);
}

/* Step 3 elements */
.form-section-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--secondary-color);
    margin: 0 0 14px 0;
}

.checkout-box {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 20px;
    margin-top: 20px;
}

.checkout-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 6px;
}

.checkout-amount {
    font-size: 20px;
    font-weight: 500;
    color: var(--success-color);
    margin-block: 8px;
}

.checkout-note {
    font-size: 13px;
    color: var(--secondary-color);
}

/* Officer add/edit form panel */
.officer-form-panel {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 14px 0 6px;
}

.officer-form-title {
    color: var(--success-color);
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 18px 0;
}

.form-label-dark {
    color: var(--secondary-color) !important;
}

.officer-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.officer-form-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

.officer-form-footer .btn-success {
    padding: 10px 32px;
    font-size: 15px;
    border-radius: 8px;
}

/* =====================
   RESPONSIVE STYLES
   ===================== */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .header-container {
        padding: 0 24px;
    }

    .header-nav ul {
        gap: 16px;
    }

    .hero-container {
        padding: 0 24px;
        gap: 32px;
    }

    .hero-content-left {
        padding-top: 40px;
    }

    .hero-headline {
        font-size: 28px;
    }

    .filing-form-card {
        padding: 28px;
    }

    .footer-container {
        padding: 40px 24px;
        gap: 40px;
    }
}

/* Mobile (max 767px) */
@media (max-width: 767px) {

    /* Header */
    .header-container {
        padding: 0 16px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .header-nav {
        display: none;
    }

    .header-right {
        gap: 12px;
        flex-wrap: wrap;
    }

    .btn-hamburger {
        display: flex;
    }

    /* Hero */
    .hero-main {
        padding: 40px 0;
    }

    .hero-container {
        flex-direction: column;
        padding: 0 16px;
        gap: 32px;
    }

    .hero-content-left {
        position: static;
        padding-top: 0;
        flex: none;
        width: 100%;
    }

    .hero-content-right {
        flex: none;
        width: 100%;
        padding: 0;
    }

    .hero-headline {
        font-size: 24px;
        margin: 0 0 16px 0;
    }

    .hero-subtext {
        font-size: 14px;
        margin: 0 0 16px 0;
    }

    .support-heading {
        font-size: 18px;
        margin: 0 0 14px 0;
    }

    .support-section {
        margin-top: 16px;
    }

    .btn-lg {
        padding: 10px 24px;
        font-size: 14px;
    }

    /* Form Card */
    .filing-form-card {
        padding: 20px 16px;
        border-radius: 16px;
    }

    .form-card-title {
        font-size: 20px;
        margin: 0 0 16px 0;
    }

    .form-card-subtitle {
        font-size: 15px;
        margin: 0 0 14px 0;
    }

    .filing-form {
        gap: 12px;
    }

    .form-input-field {
        padding: 12px 14px;
        font-size: 14px;
    }

    .btn-next {
        padding: 10px 24px;
        font-size: 14px;
    }

    .step-indicator {
        font-size: 14px;
    }

    .form-card-footer {
        margin-top: 20px;
    }

    /* Footer */
    .footer-container {
        flex-direction: column;
        padding: 32px 16px;
        gap: 28px;
    }

    .description-col {
        max-width: 100%;
    }

    .footer-bottom-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 0 16px;
    }

    /* Off-canvas */
    .off-canvas {
        width: 100%;
    }
}