@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #0b3d91; /* PUPR Navy Blue */
    --secondary-color: #ffc107; /* PUPR Yellow */
    --accent-color: #1e88e5; /* Lighter Blue */
    --bg-color: #f4f6f9;
    --card-bg: #ffffff;
    --text-main: #2c3e50;
    --text-muted: #6c757d;
    --border-color: #e9ecef;
    --danger-color: #dc3545;
    --success-color: #28a745;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =========================================
   LOGIN PAGE STYLES
   ========================================= */
.login-page {
    /* Using actual PUPR Building background */
    background: linear-gradient(rgba(11, 61, 145, 0.8), rgba(11, 61, 145, 0.85)), url('https://upload.wikimedia.org/wikipedia/commons/7/77/Gedung_Kementerian_Pekerjaan_Umum_Republik_Indonesia_%28KemenPU%2C_2012%29.jpg') center/cover fixed;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: var(--card-bg);
    width: 100%;
    max-width: 420px;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
}

.login-header {
    background: #fff;
    padding: 30px 20px 10px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.login-header img {
    width: 80px;
    margin-bottom: 15px;
}

.login-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
}

.login-body {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-with-icon input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.3s;
    background-color: #f8f9fa;
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.login-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 30px;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: var(--secondary-color);
    color: #111;
}
.btn-primary:hover {
    background: #e0a800;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 193, 7, 0.3);
}

.btn-secondary {
    background: #e9ecef;
    color: var(--text-main);
}
.btn-secondary:hover {
    background: #dde2e6;
}

/* =========================================
   DASHBOARD PAGE STYLES
   ========================================= */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--primary-color);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 2px 0 15px rgba(0,0,0,0.1);
    z-index: 10;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
    color: #fff;
}

.sidebar-logo img {
    width: 45px;
}

.sidebar-logo h3 {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: 8px;
    text-align: left;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7);
    background: transparent;
}

.sidebar-btn i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sidebar-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.sidebar-btn.active {
    background: var(--secondary-color);
    color: #111;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.mt-auto {
    margin-top: auto;
}

.sidebar-btn.logout-btn {
    color: #ff8a80;
}
.sidebar-btn.logout-btn:hover {
    background: rgba(255, 138, 128, 0.1);
    color: #ff5252;
}

.main-content {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
}

.top-header {
    background: #fff;
    padding: 20px 30px;
    border-radius: 10px;
    text-align: left;
    margin-bottom: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.03);
    border-left: 5px solid var(--secondary-color);
}

.top-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.5;
}

.content-area {
    flex: 1;
    position: relative;
}

/* Page Container (Forms) */
.page-container {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 10px;
    width: 100%;
    max-width: 850px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    position: relative;
    z-index: 2;
    border: 1px solid var(--border-color);
}

.page-title {
    margin-bottom: 25px;
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Upload Box */
.upload-box {
    border: 2px dashed #b0bec5;
    padding: 50px 20px;
    text-align: center;
    margin-bottom: 30px;
    border-radius: 8px;
    background-color: #fafcfd;
    transition: all 0.3s ease;
    display: block;
    cursor: pointer;
}

.upload-box:hover {
    background-color: #f1f8fc;
    border-color: var(--accent-color);
}

.upload-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.upload-text {
    font-size: 1.05rem;
    color: var(--text-main);
    line-height: 1.6;
    font-weight: 500;
}

.upload-box input[type="file"] {
    display: block;
    margin: 20px auto 0 auto;
    font-size: 0.95rem;
    cursor: pointer;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 15px 20px;
    align-items: center;
    margin-bottom: 25px;
}

.form-label {
    font-weight: 600;
    color: var(--text-main);
    text-align: left;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
    background-color: #f8f9fa;
}

.form-input:focus {
    border-color: var(--accent-color);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.btn-blue {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    width: 100%;
    padding: 14px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.btn-blue:hover {
    background-color: #082d6e;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(11, 61, 145, 0.2);
}

.btn-yellow {
    background-color: var(--secondary-color);
    color: #111;
    border: none;
    padding: 10px 20px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
}
.btn-yellow:hover {
    background-color: #e0a800;
}

/* Output Box */
.output-box {
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 6px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: monospace;
    font-size: 1.05rem;
    color: var(--primary-color);
    font-weight: 600;
}

.output-box i {
    color: #e53935;
    font-size: 1.2rem;
}

/* Status List */
.status-container {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}
.status-list {
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 6px;
    background: #f8f9fa;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.status-item {
    font-family: monospace;
    font-size: 1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}
.status-item i.fa-check-circle {
    color: var(--success-color);
}
.status-item i.fa-times-circle {
    color: var(--danger-color);
}
.status-result {
    font-weight: 700;
    text-align: center;
    margin-top: 25px;
    font-size: 1.15rem;
    padding: 15px;
    border-radius: 6px;
}
.result-valid {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(40, 167, 69, 0.2);
}
.result-invalid {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.data-table th, .data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: var(--primary-color);
}
.data-table tr:hover {
    background-color: #fcfcfc;
}

/* Loader Overlay */
.global-loader {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s;
}
.global-loader.active {
    visibility: visible;
    opacity: 1;
}
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(11, 61, 145, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}
.loader-text {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
