/* ============================================================
   APRB SmartDoc v1.1 — Custom Styles
   Bootstrap 5.3 + Bootstrap Icons
   ============================================================ */

:root {
    --sdm-primary: #0d6efd;
}

/* ── Layout ──────────────────────────────────────────────── */
body {
    background: #f4f6fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    flex: 1;
    margin-top: 60px;
    padding-bottom: 1.5rem;
}

/* ── Login Page ──────────────────────────────────────────── */
.login-body {
    background: #f4f6fa;
    margin-top: 0 !important;
}

.login-left {
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 50%, #0d6efd 100%);
    min-height: 100vh;
}

/* ── Navbar ──────────────────────────────────────────────── */
.navbar-brand span {
    font-size: 1rem;
    letter-spacing: -0.3px;
}

.avatar-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
    border-radius: 0.75rem;
}

.card-header {
    border-radius: 0.75rem 0.75rem 0 0 !important;
    padding: 0.9rem 1.25rem;
}

/* ── Timeline (Workflow Steps) ───────────────────────────── */
.timeline {
    position: relative;
}

.timeline-item {
    position: relative;
}

.timeline-icon {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-line {
    width: 2px;
    flex: 1;
    min-height: 30px;
    background: #dee2e6;
    margin-top: 4px;
}

/* ── Digital Signature Display ───────────────────────────── */
.signature-display {
    background: #fff;
    border: 1px solid #dee2e6 !important;
    border-radius: 0.5rem;
    padding: 8px 12px !important;
    display: inline-block;
}

.signature-display img {
    display: block;
    max-height: 80px;
    max-width: 280px;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.08));
}

/* ── Signature Pad Canvas ────────────────────────────────── */
#signaturePad {
    background: repeating-linear-gradient(
        transparent,
        transparent 39px,
        #e8edf4 39px,
        #e8edf4 40px
    );
    border-radius: 4px;
}

/* ── File Upload Drop Zone ───────────────────────────────── */
.drop-zone {
    border: 2px dashed #dee2e6;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--sdm-primary);
    background: #f0f7ff;
}

.drop-zone i {
    font-size: 2.5rem;
    color: #adb5bd;
    margin-bottom: 0.75rem;
    display: block;
}

/* ── Stat Cards ──────────────────────────────────────────── */
.stat-icon {
    line-height: 1;
}

/* ── Activity Feed ───────────────────────────────────────── */
.activity-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ── Tables ──────────────────────────────────────────────── */
.table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
}

.table td {
    font-size: 0.875rem;
    vertical-align: middle;
}

/* ── Badges ──────────────────────────────────────────────── */
.badge {
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    border-radius: 0.5rem;
}

/* ── Form Controls ───────────────────────────────────────── */
.form-control:focus, .form-select:focus {
    border-color: var(--sdm-primary);
    box-shadow: 0 0 0 0.2rem rgba(13,110,253,.12);
}

/* ── Modals ──────────────────────────────────────────────── */
.modal-content {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.modal-header {
    border-radius: 0.75rem 0.75rem 0 0;
    background: #f8f9fa;
}

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
    border-radius: 0.6rem;
    border: none;
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
    font-size: 0.78rem;
}

/* ── Pagination ──────────────────────────────────────────── */
.page-link {
    border-radius: 0.375rem !important;
    margin: 0 1px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 576px) {
    .content-wrapper { margin-top: 56px; }
    #signaturePad { height: 130px !important; }
}
