/* ===============================
   RESET GLOBAL
================================ */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ===============================
   LAYOUT
================================ */
.d-flex {
    display: flex;
}

/* ===============================
   SIDEBAR
================================ */
.sidebar {
    width: 260px;
    min-width: 260px;
    min-height: 100vh;
    padding: 16px;
    background: linear-gradient(135deg, #6a5dff, #30c1ff);
    color: #fff;
}

/* ===============================
   SIDEBAR HEADER
================================ */
.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
}

.sidebar-header img {
    width: 42px;
    height: auto;
    background: #fff;
    border-radius: 8px;
    padding: 4px;
}

.title-main {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
}

.title-sub {
    font-size: 12px;
    opacity: 0.85;
    color: #eef;
}

/* ===============================
   SIDEBAR MENU  (INI KUNCI)
================================ */
.sidebar a {
    display: block;              /* WAJIB */
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 6px;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
}

.sidebar a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar a.active {
    background: #ffffff;
    color: #4a4aff;
    font-weight: 600;
}

/* ===============================
   CONTENT AREA
================================ */
.main-content {
    flex: 1;
    min-width: 0;
    padding: 24px;
    background: #f8f9fa;
}

/* ===============================
   PREVIEW TTD - FIX 106x160
   =============================== */
.ttd-preview-wrapper {
    width: 106px;
    height: 160px;
    border: 1px solid #ccc;
    background: #fff;
    margin-top: 10px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.ttd-preview-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: none; /* default hidden */
}


