/* =========================================================
   SISTEM INFORMASI MoU - FTIK
   Stylesheet Lengkap Final
   ========================================================= */

/* ---------- 1. RESET ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #2d3748;
    background: #f7f9fc;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
}

input,
select,
textarea {
    font-family: inherit;
}

ul {
    list-style: none;
}

/* =========================================================
   2. LAYOUT UTAMA (Split Screen)
   ========================================================= */
.layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    min-height: 100vh;
}

/* =========================================================
   3. SIDEBAR KIRI
   ========================================================= */
.sidebar {
    background: linear-gradient(180deg, #1e3c72 0%, #2a5298 100%);
    color: #ffffff;
    padding: 40px 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-content {
    width: 100%;
    max-width: 320px;
}

/* ---------- Brand ---------- */
.brand {
    text-align: center;
    margin-bottom: 32px;
}

.brand-logo {
    width: 64px;
    height: 64px;
    background: #ffffff;
    color: #1e3c72;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    margin: 0 auto 14px;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.brand h1 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #ffffff;
}

.brand p {
    font-size: 12.5px;
    opacity: 0.8;
    line-height: 1.4;
    color: #ffffff;
}

/* ---------- Login Card ---------- */
.login-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 24px 22px;
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.login-card h2 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 3px;
    color: #ffffff;
}

.login-desc {
    font-size: 12px;
    opacity: 0.75;
    margin-bottom: 18px;
    color: #ffffff;
}

.field {
    margin-bottom: 14px;
}

.field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    opacity: 0.95;
    color: #ffffff;
}

.field input {
    width: 100%;
    padding: 10px 13px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 13.5px;
    transition: border-color 0.2s, background 0.2s;
}

.field input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.field input:focus {
    outline: none;
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.btn-login {
    width: 100%;
    padding: 11px;
    margin-top: 8px;
    border: none;
    border-radius: 8px;
    background: #ffffff;
    color: #1e3c72;
    font-size: 14px;
    font-weight: 700;
    transition: background 0.2s, transform 0.15s;
}

.btn-login:hover {
    background: #eaf0fb;
    transform: translateY(-1px);
}

.btn-login:active {
    transform: translateY(0);
}

.alert-error {
    background: rgba(231, 76, 60, 0.25);
    border-left: 3px solid #e74c3c;
    color: #ffe0e0;
    font-size: 12.5px;
    padding: 9px 12px;
    border-radius: 6px;
    margin-bottom: 14px;
}

.login-hint {
    text-align: center;
    font-size: 11px;
    opacity: 0.65;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* ---------- Mini Stats ---------- */
.mini-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.mini-box {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 14px 6px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: background 0.2s;
}

.mini-box:hover {
    background: rgba(255, 255, 255, 0.14);
}

.mini-num {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    color: #ffffff;
}

.mini-lbl {
    font-size: 10.5px;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
}

/* =========================================================
   4. MAIN (KANAN)
   ========================================================= */
.main {
    background: #f7f9fc;
    overflow-y: auto;
}

.main-content {
    padding: 35px 40px;
    max-width: 1400px;
}

/* ---------- Page Head ---------- */
.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.page-head h2 {
    font-size: 24px;
    color: #1e3c72;
    font-weight: 700;
    margin-bottom: 4px;
}

.page-head p {
    font-size: 13px;
    color: #718096;
}

.tag-readonly {
    background: #e8f4fd;
    color: #1e3c72;
    font-size: 11.5px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* ---------- Toolbar ---------- */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tabs {
    display: flex;
    gap: 6px;
    background: #ffffff;
    padding: 4px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.tab {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    border-radius: 7px;
    transition: all 0.2s;
    white-space: nowrap;
    display: inline-block;
}

.tab:hover {
    background: #edf2f7;
}

.tab.active {
    background: #1e3c72;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(30, 60, 114, 0.3);
}

.search-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.search-group input {
    padding: 9px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    background: #ffffff;
    min-width: 220px;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: #2d3748;
}

.search-group input:focus {
    outline: none;
    border-color: #1e3c72;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

.search-group button {
    padding: 9px 18px;
    border: none;
    border-radius: 8px;
    background: #4a5568;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}

.search-group button:hover {
    background: #2d3748;
}

/* ---------- Table Container ---------- */
.table-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    background: #ffffff;
}

table thead {
    background: #1e3c72;
    color: #ffffff;
}

table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
    color: #ffffff;
}

table td {
    padding: 13px 16px;
    border-bottom: 1px solid #edf2f7;
    color: #2d3748;
    vertical-align: middle;
}

table tbody tr:last-child td {
    border-bottom: none;
}

table tbody tr:hover {
    background: #f7fafd;
}

.fw-600 {
    font-weight: 600;
}

.empty {
    text-align: center;
    padding: 45px 20px !important;
    color: #a0aec0;
    font-size: 14px;
}

/* ---------- Badge ---------- */
.badge {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}

.badge-green {
    background: #d4f4dd;
    color: #1e6b30;
}

.badge-yellow {
    background: #fff3cc;
    color: #8a5000;
}

.badge-red {
    background: #fdd9d9;
    color: #a02020;
}

.badge-blue {
    background: #d1ecf1;
    color: #0c5460;
}

/* ---------- Footer Note ---------- */
.footer-note {
    text-align: center;
    font-size: 12.5px;
    color: #a0aec0;
    margin-top: 16px;
}

.footer-note strong {
    color: #1e3c72;
}

/* =========================================================
   5. NAVBAR (Dashboard)
   ========================================================= */
.navbar {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #ffffff;
    padding: 14px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
    gap: 16px;
    flex-wrap: wrap;
}

.navbar .brand {
    font-size: 17px;
    font-weight: 700;
    text-align: left;
    margin: 0;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13.5px;
}

/* =========================================================
   6. CONTAINER
   ========================================================= */
.container {
    max-width: 1300px;
    margin: 28px auto;
    padding: 0 25px;
}

/* =========================================================
   7. STATS CARDS
   ========================================================= */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #1e3c72;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.stat-card.blue { border-color: #3498db; }
.stat-card.green { border-color: #27ae60; }
.stat-card.orange { border-color: #f39c12; }
.stat-card.red { border-color: #e74c3c; }

.stat-num {
    font-size: 30px;
    font-weight: 700;
    color: #1e3c72;
    line-height: 1.1;
}

.stat-label {
    font-size: 12.5px;
    color: #718096;
    margin-top: 5px;
}

/* =========================================================
   8. CARD
   ========================================================= */
.card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    padding: 24px;
    margin-bottom: 22px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f4f8;
    gap: 12px;
    flex-wrap: wrap;
}

.card-header h2 {
    font-size: 19px;
    color: #1e3c72;
    font-weight: 700;
}

/* =========================================================
   9. BUTTONS (Umum)
   ========================================================= */
.btn {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    line-height: 1.4;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.btn:active {
    transform: translateY(0);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-primary {
    background: #1e3c72;
    color: #ffffff;
}

.btn-primary:hover {
    background: #2a5298;
    color: #ffffff;
}

.btn-secondary {
    background: #6c757d;
    color: #ffffff;
}

.btn-secondary:hover {
    background: #5a6268;
    color: #ffffff;
}

.btn-info {
    background: #17a2b8;
    color: #ffffff;
}

.btn-info:hover {
    background: #138496;
    color: #ffffff;
}

.btn-warning {
    background: #f39c12;
    color: #ffffff;
}

.btn-warning:hover {
    background: #e08e0b;
    color: #ffffff;
}

.btn-danger {
    background: #e74c3c;
    color: #ffffff;
}

.btn-danger:hover {
    background: #c0392b;
    color: #ffffff;
}

.btn-success {
    background: #27ae60;
    color: #ffffff;
}

.btn-success:hover {
    background: #229954;
    color: #ffffff;
}

/* =========================================================
   10. ALERTS
   ========================================================= */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 13.5px;
    line-height: 1.6;
}

.alert ul {
    margin: 8px 0 0 20px;
    list-style: disc;
}

.alert ul li {
    margin: 5px 0;
}

.alert a {
    font-weight: 600;
    text-decoration: underline;
}

.alert-danger {
    background: #fde8e8;
    color: #a02020;
    border-left: 4px solid #e74c3c;
}

.alert-warning {
    background: #fff8e6;
    color: #8a5000;
    border-left: 4px solid #f39c12;
}

.alert-success {
    background: #e8f8ec;
    color: #1e6b30;
    border-left: 4px solid #27ae60;
}

.alert-info {
    background: #e8f4fd;
    color: #1e3c72;
    border-left: 4px solid #3498db;
}

/* =========================================================
   11. FORM
   ========================================================= */
.form-card {
    max-width: 780px;
    margin: 0 auto;
}

.form-card h2 {
    margin-bottom: 22px;
    color: #1e3c72;
    font-size: 21px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f4f8;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: #2d3748;
}

.form-group input:disabled {
    background: #f5f7fa;
    color: #718096;
    cursor: not-allowed;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1e3c72;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 90px;
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #718096;
    line-height: 1.5;
}

.form-group small a {
    color: #1e3c72;
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* =========================================================
   12. DETAIL TABLE
   ========================================================= */
.detail-table {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.detail-table th {
    width: 220px;
    background: #f8f9fb;
    font-weight: 600;
    color: #4a5568;
    text-align: left;
    font-size: 13px;
}

.detail-table td,
.detail-table th {
    padding: 14px 18px;
    border-bottom: 1px solid #edf2f7;
    vertical-align: top;
    font-size: 14px;
}

.detail-table tr:last-child th,
.detail-table tr:last-child td {
    border-bottom: none;
}

.detail-table td img {
    max-width: 400px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* =========================================================
   13. UTILITY
   ========================================================= */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }

/* =========================================================
   14. RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
    .layout {
        grid-template-columns: 340px 1fr;
    }
    .sidebar {
        padding: 30px 25px;
    }
    .main-content {
        padding: 28px 25px;
    }
}

@media (max-width: 820px) {
    .layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: relative;
        height: auto;
        min-height: auto;
        padding: 35px 25px;
    }
    .sidebar-content {
        max-width: 420px;
        margin: 0 auto;
    }
    .main-content {
        padding: 25px 20px;
    }
    .page-head h2 {
        font-size: 20px;
    }
}

@media (max-width: 700px) {
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .tabs {
        justify-content: center;
        overflow-x: auto;
    }
    .search-group input {
        min-width: auto;
        flex: 1;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .navbar {
        flex-direction: column;
        text-align: center;
    }
    .nav-right {
        justify-content: center;
        flex-wrap: wrap;
    }
    .card {
        padding: 18px;
    }
    .table-container {
        overflow-x: auto;
    }
    table th,
    table td {
        padding: 10px 12px;
        font-size: 12px;
    }
    .detail-table th,
    .detail-table td {
        display: block;
        width: 100%;
        padding: 10px 14px;
    }
    .detail-table th {
        background: #eef0f4;
        border-bottom: none;
    }
}

@media (max-width: 480px) {
    .sidebar {
        padding: 28px 18px;
    }
    .login-card {
        padding: 20px 16px;
    }
    .brand h1 {
        font-size: 18px;
    }
    .page-head h2 {
        font-size: 18px;
    }
    .tag-readonly {
        display: none;
    }
    .search-group {
        flex-direction: column;
        align-items: stretch;
    }
    .search-group button {
        width: 100%;
    }
    .mini-num {
        font-size: 17px;
    }
    .stat-num {
        font-size: 24px;
    }
}

/* =========================================================
   15. PRINT
   ========================================================= */
@media print {
    .sidebar,
    .navbar,
    .toolbar,
    .btn,
    .aksi,
    .tag-readonly {
        display: none !important;
    }
    .layout {
        display: block;
    }
    .main-content {
        padding: 0;
        max-width: 100%;
    }
    body {
        background: #ffffff;
    }
    .table-container,
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    table thead {
        background: #eee !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}