/* =========================================
1. GLOBAL & RESET STYLES
========================================= */
* {
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    padding: 20px;
}

/* =========================================
2. LAYOUT & CONTAINERS
========================================= */
.container {
    width: 98%;
    max-width: none;
    margin: 0 auto;
}

.dh-container-all {
    margin-top: 80px;
}

.dh-container-app {
    margin-top: 80px;
    justify-content: center;
    background: url('https://workspace.dhununk.com/pattern.png') no-repeat center center;
    background-size: cover;
    background-color: #fff6ea;
    padding: 40px 20px;
    border-radius: 10px;
    border: 1px solid #f0c17b9c;
}

.dh-container-app p {
    color: #555;
    font-size: 1em;
    margin-bottom: 30px;
    line-height: 1.5em;
}

.dh-box-app {
    max-width: 700px;
    margin: 20px auto;
    text-align: center;
}

.preview-section {
    margin-top: 30px;
    display: none;
}

/* =========================================
3. HEADER & NAVIGATION (NAVBAR)
========================================= */
.dh-navbar {
    background-color: #fff7;
    color: #555;
    padding: 15px 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.dh-navbar h1 {
    margin: 0;
    font-size: 1.5em;
    font-weight: bold;
}

.dh-navbar-subtitle {
    font-size: 0.9em;
    color: #888;
}

.dh-navbar-subtitle a {
    color: #ff8c00;
    text-decoration: none;
    font-weight: 400;
}

.dh-logo-img {
    width: 40px;
    height: 40px;
    margin-right: 15px;
}

.dh-logo-img img {
    width: 100%;
    height: 100%;
}

.dh-branding {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* =========================================
10. APP MENU DROPDOWN
========================================= */
.dh-navbar-actions {
    margin-left: auto;
    position: relative;
}

.app-menu-btn {
    background: transparent;
    border: 0px;
    padding: 10px 20px;
    font-size: 0.9em;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    transition: background 0.3s, border-color 0.3s;
}

.app-menu-btn:hover {
    background: #ff8c0011;
    color: #ff8c00;
}

.app-dropdown-menu {
    position: absolute;
    top: 130%; 
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    padding: 15px;
    display: none; 
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 360px;
    z-index: 1001;
    
    /* --- Penyesuaian Max Height --- */
    /* 100vh = tinggi layar penuh */
    /* 80px = PERKIRAAN jarak dari atas layar sampai ke awal dropdown (sesuaikan dengan tinggi header/nav Anda) */
    /* 20px = sisa jarak aman di bawah layar */
    max-height: calc(100vh - 80px - 10px); 
    overflow-y: auto;
}

.app-dropdown-menu.show {
    display: grid; 
}

.app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #555;
    padding: 15px 10px;
    border-radius: 8px;
    transition: all 0.2s;
    text-align: center;
    font-size: 0.85em;
    font-weight: 400;
}
.app-item span {
    margin-top: 5px;
    font-size: 0.8em;
}

.app-item i {
    font-size: 2.4em;
    margin-bottom: 8px;
    transition: transform 0.2s;
}

.app-item:hover i {
    color: #ff8c00;
}

.app-item:hover {
    background: #fff6ea;
    color: #d35400;
}

.app-item:hover i {
    transform: scale(1.1);
}

/* =========================================
6. FORMS, INPUTS & FILE UPLOAD
========================================= */
/* Upload Section */
.upload-section {
    border: 2px dashed #ff8c00;
    padding: 70px 30px;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 20px;
    background: #ffb45e24;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.upload-section.drag-over {
    background: #ffdbb0;
    border-color: #d35400;
    border-style: solid;
    transform: scale(1.02);
}

input[type="file"] {
    display: none;
}

.file-label {
    background: #ff9e1f;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    display: inline-block;
    transition: background 0.3s;
}

.file-label:hover {
    background: #d47c09;
}

.file-name {
    display: block;
    margin-top: 15px;
    font-size: 0.9em;
    color: #7f8c8d;
}

/* =========================================
11. APP MENU DROPDOWN GROUPING
========================================= */
.app-group-title {
    grid-column: 1 / -1; 
    font-size: 0.75em;
    color: #95a5a6;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    padding-bottom: 5px;
    border-bottom: 1px dashed #ecf0f1;
    margin-top: 15px;
    margin-bottom: 5px;
    text-align: left;
    padding-left: 10px;
}

.app-dropdown-menu .app-group-title:first-child {
    margin-top: 0;
}

/* =========================================
12. BUTTONS & INTERACTIONS
========================================= */

.btn {
    background: #2ecc71;
    color: #fff;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    margin-bottom: 10px;
    transition: background 0.3s;
}

.btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

/* Icon Spacing */
.btn i, .tab-btn i {
    margin-right: 6px;
}

/* Specific Button Variants */
.btn-big {
    padding: 30px;
    font-size: 26px;
    background-color: #ff9e1f;
}
.btn-big:disabled {
    background: #ff9e1f75;
    cursor: not-allowed;
    backdrop-filter: blur(10px);
}

.dh-footer {
    padding: 50px 0;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
}

.dh-img-splashscreen {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;
}
.dh-img-splashscreen img {
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center center;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}