/* ===== Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ===== Base ===== */
html {
    font-size: 15px;
    position: relative;
    min-height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1e293b;
    background: #f8f9fb;
    margin-bottom: 60px;
    -webkit-font-smoothing: antialiased;
}

/* ===== Staff Navbar ===== */
.navbar-staff {
    background: #0f172a;
    border-bottom: 3px solid #c9a84c;
    padding: .75rem 0;
}

.navbar-staff .navbar-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: .02em;
}

.navbar-staff .navbar-brand:hover {
    color: #c9a84c;
}

.navbar-staff .nav-link {
    color: rgba(255,255,255,.75);
    font-weight: 500;
    font-size: .875rem;
    padding: .5rem 1rem;
    border-radius: 6px;
    transition: all .15s;
}

.navbar-staff .nav-link:hover,
.navbar-staff .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,.1);
}

.navbar-staff .navbar-toggler {
    border-color: rgba(255,255,255,.25);
}

.navbar-staff .navbar-toggler-icon {
    filter: invert(1);
}

/* ===== Page Headers ===== */
.page-header {
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.page-header h2 {
    font-weight: 700;
    font-size: 1.5rem;
    color: #0f172a;
    margin: 0;
}

.page-header .subtitle {
    color: #64748b;
    font-size: .875rem;
    margin-top: .25rem;
}

/* ===== Cards ===== */
.card-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

/* ===== Tables ===== */
.table-professional {
    font-size: .875rem;
}

.table-professional thead th {
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 2px solid #e2e8f0;
    padding: .75rem 1rem;
    white-space: nowrap;
}

.table-professional tbody td {
    padding: .75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.table-professional tbody tr:hover {
    background: #f8fafc;
}

/* ===== Status Badges ===== */
.badge-status {
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: .35em .75em;
    border-radius: 5px;
}

.badge-signed { background: #dcfce7; color: #166534; }
.badge-sent { background: #dbeafe; color: #1e40af; }
.badge-expired { background: #fef3c7; color: #92400e; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }
.badge-draft { background: #f1f5f9; color: #475569; }

/* ===== Buttons ===== */
.btn {
    font-weight: 500;
    font-size: .875rem;
    border-radius: 7px;
    padding: .5rem 1.25rem;
    transition: all .15s;
}

.btn-navy {
    background: #0f172a;
    color: #fff;
    border: none;
}

.btn-navy:hover {
    background: #1e293b;
    color: #fff;
}

.btn-gold {
    background: #c9a84c;
    color: #0f172a;
    border: none;
    font-weight: 600;
}

.btn-gold:hover {
    background: #b8952f;
    color: #0f172a;
}

.btn-outline-subtle {
    border: 1px solid #cbd5e1;
    color: #475569;
    background: transparent;
}

.btn-outline-subtle:hover {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #94a3b8;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(201,168,76,.4);
}

/* ===== Forms ===== */
.form-label {
    font-weight: 500;
    font-size: .8125rem;
    color: #475569;
    margin-bottom: .35rem;
}

.form-control, .form-select {
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    padding: .55rem .85rem;
    font-size: .875rem;
    color: #1e293b;
    transition: border-color .15s;
}

.form-control:focus, .form-select:focus {
    border-color: #c9a84c;
    box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}

/* ===== Detail View ===== */
.detail-grid dt {
    font-weight: 600;
    font-size: .8125rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding-top: .65rem;
    padding-bottom: .65rem;
}

.detail-grid dd {
    font-size: .9rem;
    color: #1e293b;
    padding-top: .65rem;
    padding-bottom: .65rem;
    border-bottom: 1px solid #f1f5f9;
}

/* ===== Signing URL Box ===== */
.signing-url-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.signing-url-box a {
    color: #1d4ed8;
    word-break: break-all;
    font-size: .85rem;
}

/* ===== Signature Block ===== */
.signature-block {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 1.25rem;
}

/* ===== Filter Pills ===== */
.filter-pills .btn {
    font-size: .75rem;
    padding: .35rem .85rem;
    border-radius: 20px;
    font-weight: 500;
}

.filter-pills .btn-active {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
}

.filter-pills .btn-inactive {
    background: transparent;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.filter-pills .btn-inactive:hover {
    background: #f1f5f9;
    color: #1e293b;
}

/* ===== Placeholder Tags ===== */
.placeholder-tag {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    font-size: .75rem;
    font-weight: 600;
    padding: .2em .6em;
    border-radius: 4px;
    margin: .15rem .25rem .15rem 0;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ===== Footer ===== */
.footer-staff {
    background: #0f172a;
    color: rgba(255,255,255,.5);
    font-size: .8rem;
    padding: 1rem 0;
    position: absolute;
    bottom: 0;
    width: 100%;
}

/* ===== Signing Portal ===== */
.signing-page {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
}

.signing-container {
    max-width: 780px;
    margin: 0 auto;
    padding: 2.5rem 1rem;
}

.signing-header {
    text-align: center;
    padding: 2rem 0 1.5rem;
}

.signing-header .brand {
    font-size: 1.1rem;
    font-weight: 700;
    color: #c9a84c;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.signing-header .title {
    color: #fff;
    font-size: 1.6rem;
    font-weight: 700;
    margin: .5rem 0 0;
}

.signing-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    overflow: hidden;
}

.signing-body {
    padding: 2.5rem;
    font-size: .925rem;
    line-height: 1.7;
    color: #334155;
}

.signing-footer {
    background: #f8f9fb;
    border-top: 1px solid #e2e8f0;
    padding: 2rem 2.5rem;
}

.signing-footer .form-label {
    font-weight: 600;
    color: #1e293b;
}

.signing-footer .btn-sign {
    background: #0f172a;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    padding: .75rem 2.5rem;
    border-radius: 8px;
    border: none;
    transition: all .2s;
}

.signing-footer .btn-sign:hover {
    background: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
}

.signing-result {
    text-align: center;
    padding: 3.5rem 2rem;
}

.signing-result .icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

.signing-result .icon-success { background: #dcfce7; color: #166534; }
.signing-result .icon-warning { background: #fef3c7; color: #92400e; }
.signing-result .icon-error { background: #fee2e2; color: #991b1b; }

.signing-result h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: .5rem;
}

.signing-result p {
    color: #64748b;
    font-size: .95rem;
    max-width: 380px;
    margin: 0 auto;
    line-height: 1.6;
}

.signing-legal {
    text-align: center;
    color: rgba(255,255,255,.35);
    font-size: .75rem;
    padding: 1.5rem 0;
}

/* ===== Landing Page ===== */
.landing-hero {
    text-align: center;
    padding: 3rem 0 2rem;
}

.landing-hero h1 {
    font-size: 2.75rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.landing-tagline {
    font-size: 1.1rem;
    color: #64748b;
    margin-top: .5rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.landing-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0 3rem;
}

.landing-step {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.75rem 1.5rem;
    text-align: center;
}

.step-number {
    width: 36px;
    height: 36px;
    background: #0f172a;
    color: #c9a84c;
    font-weight: 700;
    font-size: .9rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.landing-step h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: .5rem;
}

.landing-step p {
    font-size: .85rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

.landing-cta {
    text-align: center;
    padding-bottom: 2rem;
}
