:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --card-bg: rgba(255, 255, 255, 0.8);
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 1400px;
    border-radius: 20px;
    padding: 40px 50px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    padding: 10px 0;
}

.logo-left {
    position: absolute;
    top: -10px;
    left: -10px;
}

.logo-right {
    position: absolute;
    top: -10px;
    right: -10px;
}

.app-logo {
    max-height: 100px;
    width: auto;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: block;
}

.logo-left a,
.logo-right a {
    text-decoration: none;
    display: block;
}

.logo-left a:hover .app-logo,
.logo-right a:hover .app-logo {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

h1 {
    font-weight: 700;
    font-size: 2.2rem;
    color: #111827;
    margin-bottom: 20px;
    padding-top: 110px;
}

p {
    color: var(--text-muted);
}

.report-actions-bottom {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.admin-icons-corner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
}

.icon-btn-small {
    width: 36px;
    height: 36px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    color: var(--text-main);
    padding: 0;
}

.icon-btn-small:hover {
    transform: scale(1.1);
    background: #f3f4f6;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.upload-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.upload-btn-secondary {
    display: inline-block;
    padding: 12px 24px;
    cursor: pointer;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.custom-file-upload {
    display: inline-block;
    padding: 12px 24px;
    cursor: pointer;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.custom-file-upload:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.custom-file-upload input {
    display: none;
}

.hidden {
    display: none !important;
}

.metadata-grid {
    display: grid;
    grid-template-columns: 2.5fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.metadata-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.selectors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
    width: 100%;
    overflow-x: visible;
}

.input-row {
    grid-column: 1 / -1;
    display: flex;
    gap: 20px;
    margin-bottom: 5px;
    align-items: flex-start;
}

.input-name-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.input-name-group label,
.language-group label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.language-group {
    display: flex;
    flex-direction: column;
    min-width: 120px;
}

.lang-toggle {
    display: flex;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    overflow: hidden;
    height: 44px;
}

.lang-toggle input {
    display: none;
}

.lang-toggle label {
    flex: 1;
    text-align: center;
    line-height: 42px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0;
    transition: all 0.2s;
    color: var(--text-main);
}

.lang-toggle input:checked+label {
    background: var(--primary-color);
    color: white;
}

.lang-toggle label:first-of-type {
    border-right: 1px solid #d1d5db;
}

.modern-input {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background-color: white;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
}

.modern-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

#kwartal {
    text-align: right;
    font-family: inherit;
}

.text-right {
    text-align: right !important;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: none;
}

@media (max-width: 640px) {
    .selectors-grid {
        grid-template-columns: 1fr;
    }
}

.select-group {
    display: flex;
    flex-direction: column;
}

.select-group label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.modern-select {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background-color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s;
    outline: none;
    width: 100%;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.modern-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.primary-btn {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.report-section {
    margin-top: 40px;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.report-header h3 {
    font-size: 1rem;
    margin-bottom: 0;
    color: var(--text-muted);
}

.table-container {
    max-height: none;
    overflow-y: visible;
    margin-bottom: 20px;
    border: 1px solid #f3f4f6;
    border-radius: 8px;
}

#report-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    table-layout: fixed;
}

#report-table th {
    white-space: normal;
    vertical-align: bottom;
}

#report-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#report-table th:nth-child(1),
#report-table td:nth-child(1) {
    width: auto;
    text-align: left;
}

#report-table th:nth-child(2),
#report-table td:nth-child(2) {
    width: 150px;
    text-align: center;
}

#report-table th:nth-child(3),
#report-table td:nth-child(3) {
    width: 320px;
    text-align: right;
}

#report-table th:nth-child(4),
#report-table td:nth-child(4) {
    width: 100px;
    text-align: right;
}

th {
    text-align: left;
    padding: 12px;
    background: #f9fafb;
    border-bottom: 2px solid #eee;
    color: var(--text-muted);
}

tbody tr:hover {
    background-color: #f8fafc;
}

.download-btn {
    width: 100%;
    padding: 15px;
    background: #059669;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.download-btn:hover {
    background: #047857;
}

.result-section {
    text-align: center;
    background: rgba(79, 70, 229, 0.05);
    padding: 30px;
    border-radius: 15px;
    border: 2px dashed var(--primary-color);
}

.result-section h2 {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.code-display {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: 5px;
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
}

.secondary-btn {
    padding: 10px 20px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.secondary-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.danger-btn {
    padding: 10px;
    background: #fee2e2;
    color: #ef4444;
    border: 1px solid #fecaca;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.danger-btn:hover {
    background: #ef4444;
    color: white;
}

footer {
    margin-top: 40px;
    text-align: center;
    font-size: 0.8rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 20px;
    color: var(--text-muted);
}
