/* ============================================================
   DocuSign PH - Global Styles
   ============================================================ */

:root {
    --primary:   #0d6efd;
    --sidebar-w: 250px;
    --sidebar-bg: #1e2a3a;
    --sidebar-text: #adb5bd;
    --sidebar-active: #0d6efd;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: #f4f6f9;
}

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: var(--sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: width 0.2s;
}

.sidebar .brand {
    padding: 1.2rem 1rem;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar .nav-link {
    color: var(--sidebar-text);
    padding: 0.65rem 1.2rem;
    border-radius: 0.4rem;
    margin: 2px 8px;
    font-size: 0.9rem;
    transition: background 0.15s, color 0.15s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgba(13,110,253,0.15);
    color: #fff;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
}

/* ---- Main content ---- */
.main-content {
    margin-left: var(--sidebar-w);
    padding: 1.5rem;
    min-height: 100vh;
}

/* ---- Topbar ---- */
.topbar {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
}

/* ---- Cards ---- */
.stat-card {
    border: none;
    border-radius: 0.75rem;
    transition: transform 0.15s, box-shadow 0.15s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

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

/* ---- Status badges ---- */
.badge-pending          { background: #ffc107; color: #000; }
.badge-partially-signed { background: #0dcaf0; color: #000; }
.badge-fully-signed     { background: #198754; color: #fff; }
.badge-rejected         { background: #dc3545; color: #fff; }
.badge-waiting          { background: #6c757d; color: #fff; }

/* ---- PDF viewer overlay ---- */
#pdfViewerContainer {
    position: relative;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #525659;
}

/* ---- Signature canvas ---- */
#signatureCanvas {
    border: 2px dashed #0d6efd;
    border-radius: 0.4rem;
    cursor: crosshair;
    background: #fff;
    touch-action: none;
}

/* ---- Signature placement draggable ---- */
.sig-placeholder {
    position: absolute;
    border: 2px dashed #0d6efd;
    background: rgba(13,110,253,0.08);
    cursor: move;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #0d6efd;
    user-select: none;
    min-width: 150px;
    min-height: 60px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .sidebar { width: 0; overflow: hidden; }
    .sidebar.open { width: var(--sidebar-w); }
    .main-content { margin-left: 0; }
}
