* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('../images/bg.jpg') no-repeat fixed;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    overflow: visible;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.table-wrapper {
    padding: 30px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

table thead {
    background: #f5f5f5;
    border-bottom: 3px solid #667eea;
}

table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

table td {
    padding: 15px;
    border-bottom: 1px solid #ddd;
    color: #555;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

table tbody tr:hover {
    background: #f9f9f9;
}

input[type="checkbox"] {
    cursor: pointer;
}

select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    cursor: pointer;
    font-size: 0.95em;
    color: #555;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-align: center;
    display: inline-block;
}

.status-progress {
    background: #ffc107;
    color: #333;
}

.status-selesai {
    background: #28a745;
    color: white;
}

.status-belum {
    background: #e9ecef;
    color: #333;
}

.button-group {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-warning {
    background: #ffc107;
    color: #333;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.admin-container {
    min-height: 100vh;
    background: url('../images/bg.jpg') no-repeat fixed;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 20px;
}

.admin-box {
    max-width: 500px;
    margin: 100px auto;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.admin-box h2 {
    color: #667eea;
    margin-bottom: 30px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.admin-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin: 20px auto;
    max-width: 800px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.admin-form h2 {
    color: #667eea;
    margin-bottom: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-full {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .table-wrapper {
        padding: 15px;
    }
    
    table th, table td {
        padding: 10px;
        font-size: 0.9em;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .button-group {
        flex-direction: column;
    }
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    text-align: center;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    padding: 10px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.back-link:hover {
    background: #5568d3;
    transform: translateX(-5px);
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

.empty-state p {
    font-size: 1.1em;
    margin-bottom: 20px;
}

.nav-menu {
    background: #333;
    padding: 15px 30px;
    display: flex;
    gap: 20px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: #667eea;
}

/* Icon buttons for table actions */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.2s ease;
    margin: 0 4px;
}

.btn-edit {
    background: #6c757d;
}

.btn-edit:hover {
    background: #5a6268;
    transform: scale(1.15);
}

.btn-delete {
    background: #dc3545;
}

.btn-delete:hover {
    background: #c82333;
    transform: scale(1.15);
}

/* Mobile/tablet: convert table into stacked cards for small screens */
@media (max-width: 700px) {
    table thead {
        display: none;
    }

    table, table tbody, table tr, table td {
        display: block;
        width: 100%;
    }

    table tr {
        margin-bottom: 12px;
        border: 1px solid #eee;
        border-radius: 8px;
        padding: 10px;
        background: #fff;
    }

    table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 10px;
        border-bottom: none;
    }

    table td:before {
        content: attr(data-label) ":";
        font-weight: 700;
        color: #333;
        margin-right: 8px;
        flex: 0 0 38%;
    }

    table td[data-label="Aksi"] {
        display: flex;
        gap: 8px;
        justify-content: flex-end;
    }

    .nav-menu {
        flex-wrap: wrap;
        gap: 10px;
    }

    .nav-menu a {
        padding: 8px 12px;
    }
}
