/* File CSS untuk styling */ 
/* Base styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f9f9fb;
    color: #333;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: #2c3e50;
    padding: 15px 20px;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.nav-list li {
    margin-right: 20px;
}

.nav-list li a {
    color: #ecf0f1;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-list li a:hover {
    color: #1abc9c;
}

main {
    max-width: 1000px;
    margin: 30px auto;
    background: white;
    padding: 25px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 6px;
    flex-grow: 1;
}

h1, h2, h3 {
    color: #34495e;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    border: 1px solid #ddd;
    padding: 10px 12px;
    text-align: left;
}

table th {
    background-color: #2980b9;
    color: white;
}

button, input[type="submit"] {
    background-color: #1abc9c;
    color: white;
    border: none;
    padding: 10px 18px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover, input[type="submit"]:hover {
    background-color: #16a085;
}

input[type="text"], input[type="password"], input[type="number"], textarea, select {
    width: 100%;
    padding: 8px 10px;
    margin-top: 6px;
    margin-bottom: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.success-msg {
    background-color: #dff0d8;
    color: #3c763d;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.error-msg {
    background-color: #f2dede;
    color: #a94442;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
}

footer {
    text-align: center;
    padding: 20px 0;
    background-color: #2c3e50;
    color: #bdc3c7;
    font-size: 0.9em;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-list {
        flex-direction: column;
    }
    .nav-list li {
        margin: 8px 0;
    }
}

/* Dashboard cards */
.dashboard-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.card {
    background: #1abc9c;
    color: white;
    flex: 1 1 220px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(26, 188, 156, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: background-color 0.3s ease;
}

.card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.card p {
    font-size: 2.5em;
    font-weight: bold;
    margin: 0 0 15px 0;
}

.card .btn {
    background-color: white;
    color: #1abc9c;
    text-align: center;
    padding: 10px 15px;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.card .btn:hover {
    background-color: #16a085;
    color: white;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.dashboard-table th, .dashboard-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.dashboard-table th {
    background-color: #f2f2f2;
    font-weight: bold;
    color: #34495e;
}

.dashboard-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.dashboard-table tr:hover {
    background-color: #e9e9e9;
}

ul {
    list-style-type: none;
    padding-left: 0;
}

ul li {
    margin-bottom: 8px;
}

ul li a {
    text-decoration: none;
    color: #1abc9c;
    font-weight: 600;
}

ul li a:hover {
    text-decoration: underline;
}

/* Compact form styles for pages/input_data.php */
.compact-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    align-items: center;
}

.compact-form .form-group {
    display: flex;
    flex-direction: column;
    flex: 1 1 200px;
    min-width: 200px;
}

.compact-form .form-group label {
    margin-bottom: 4px;
    font-weight: 600;
    white-space: nowrap;
}

.compact-form .form-group input {
    width: 100%;
    padding: 6px 8px;
    margin: 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 0.9em;
}

.compact-form .form-actions {
    flex-basis: 100%;
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.compact-form .form-actions button,
.compact-form .form-actions a {
    padding: 8px 16px;
    font-size: 0.9em;
    border-radius: 4px;
    text-decoration: none;
}

.compact-form .form-actions a {
    background-color: #ccc;
    color: #333;
    border: 1px solid #999;
}

.compact-form .form-actions a:hover {
    background-color: #bbb;
    color: #000;
}

/* Report styles */
.report-container {
    max-width: 900px;
    margin: 0 auto 40px auto;
    padding: 20px 30px;
    background: white;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

.report-header {
    display: flex;
    align-items: center;
    border-bottom: 2px solid #1abc9c;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.report-logo {
    flex: 0 0 100px;
}

.report-logo .logo {
    max-width: 100px;
    height: auto;
}

.report-info {
    flex: 1;
    padding-left: 20px;
}

.report-info h1 {
    margin: 0;
    font-size: 1.8em;
    color: #16a085;
}

.report-info h2 {
    margin: 5px 0 0 0;
    font-weight: normal;
    color: #34495e;
}

.report-date {
    margin-top: 8px;
    font-style: italic;
    color: #7f8c8d;
}

.report-title h2 {
    color: #2980b9;
    margin-bottom: 5px;
}

.print-btn {
    background-color: #1abc9c;
    color: white;
    border: none;
    padding: 10px 18px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background-color 0.3s ease;
}

.print-btn:hover {
    background-color: #16a085;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.report-table th, .report-table td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: left;
    font-size: 14px;
}

.report-table th {
    background-color: #2980b9;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.report-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.report-table tr:hover {
    background-color: #e9e9e9;
    transition: background-color 0.2s ease;
}

.report-table td {
    border-bottom: 1px solid #eee;
}

.report-table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.report-footer {
    font-style: italic;
    color: #7f8c8d;
    border-top: 1px solid #ddd;
    padding-top: 10px;
    text-align: center;
}

/* Login page styles */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 10px;
    text-align: center;
}

.login-container h2 {
    margin-bottom: 30px;
    color: #34495e;
    font-size: 28px;
    font-weight: 600;
}

.login-form {
    display: flex;
    flex-direction: column;
}

.login-label {
    text-align: left;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.login-input {
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.login-input:focus {
    outline: none;
    border-color: #1abc9c;
    box-shadow: 0 0 5px rgba(26, 188, 156, 0.3);
}

.login-button {
    padding: 12px 20px;
    background-color: #1abc9c;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.login-button:hover {
    background-color: #16a085;
}

.login-message {
    margin-top: 20px;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    min-height: 20px;
}

.login-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.login-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Responsive for login */
@media (max-width: 480px) {
    .login-container {
        margin: 50px 20px;
        padding: 30px 20px;
    }
    .login-container h2 {
        font-size: 24px;
    }
}

/* Print styles */
@media print {
    body * {
        visibility: hidden;
    }
    .report-container, .report-container * {
        visibility: visible;
    }
    .report-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
        border-radius: 0;
        margin: 0;
        padding: 20px;
        font-size: 12px;
        color: black;
        background: white;
        page-break-after: avoid;
    }
    .print-btn, .report-header, .report-footer, header, footer, nav, .nav-list {
        display: none !important;
    }
    .report-title {
        text-align: center;
        margin-bottom: 20px;
    }
    .report-title h2 {
        font-size: 18px;
        font-weight: bold;
        margin: 0;
        text-decoration: underline;
    }
    .report-title p {
        font-size: 12px;
        margin: 10px 0 0 0;
    }
    .report-table {
        border: 1px solid black;
        margin-top: 20px;
    }
    .report-table th, .report-table td {
        border: 1px solid black;
        padding: 6px 8px;
        font-size: 11px;
        text-align: center;
    }
    .report-table th {
        background: white;
        color: black;
        font-weight: bold;
    }
    .report-table tr:nth-child(even) {
        background: white;
    }
}
