/**
 * ==============================================================
 * Auto-Certificate Pro - Global Stylesheet
 * Modern Dashboard UI, Visual Layout Builder & Print Styles
 * ==============================================================
 */

:root {
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-dark: #3730a3;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-soft: #e2e8f0;
    --sidebar-width: 260px;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar-custom {
    background: #0f172a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.navbar-custom .navbar-brand {
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #ffffff;
}
.navbar-custom .nav-link {
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.92rem;
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    transition: all 0.2s;
}
.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

/* Card Modern */
.card-modern {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    box-shadow: 0 4px 15px -2px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-modern:hover {
    box-shadow: 0 10px 25px -3px rgba(15, 23, 42, 0.07);
}

/* Stat Card */
.stat-card {
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    background: #ffffff;
}
.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Custom Buttons */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
    border-radius: 10px;
    padding: 0.55rem 1.25rem;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}
.btn-rounded {
    border-radius: 50px;
}

/* Badges */
.badge-role {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
}
.badge-status-aktif {
    background-color: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.badge-status-dicabut {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* Visual Designer Canvas */
.designer-container {
    background: #334155;
    border-radius: 16px;
    padding: 20px;
    overflow: auto;
    display: flex;
    justify-content: center;
    position: relative;
}
.designer-board {
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    user-select: none;
    transform-origin: top center;
}
.designer-element {
    position: absolute;
    cursor: move;
    border: 1px dashed rgba(79, 70, 229, 0.6);
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    white-space: nowrap;
    border-radius: 4px;
    transition: outline 0.1s;
}
.designer-element:hover,
.designer-element.active {
    border: 2px solid #4f46e5;
    background: rgba(79, 70, 229, 0.15);
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.4);
}

/* Public Verification Certificate Showcase */
.cert-showcase-frame {
    background: #0f172a;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.3);
}
.cert-showcase-frame img {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 100%;
}

/* High-Quality Print Stylesheet */
@media print {
    body, html {
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
    }
    .no-print {
        display: none !important;
    }
    .print-cert-container {
        width: 100vw !important;
        height: 100vh !important;
        margin: 0 !important;
        padding: 0 !important;
        page-break-inside: avoid;
    }
    .print-cert-container img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }
    @page {
        size: A4 landscape;
        margin: 0;
    }
}
