/* assets/css/style.css */
/* Reset dasar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Background yang fleksibel */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-image: url('../img/bg1.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: #333;
    min-height: 100vh;
    /* Backup jika background tidak muncul */
    background-color: #f0f2f5;
}

/* Overlay untuk kontras teks */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

/* Container utama */
.container, .login-container {
    max-width: 900px;
    margin: 40px auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Header */
header {
    background: #003366;
    color: white;
    text-align: center;
    padding: 25px;
    font-size: 24px;
    font-weight: bold;
    border-bottom: 3px solid #004080;
}

/* Navigasi */
nav {
    background: #f8f9fa;
    padding: 15px 0;
    text-align: center;
    font-weight: 500;
}

nav a {
    margin: 0 15px;
    text-decoration: none;
    color: #003366;
    font-weight: 500;
}

nav a:hover {
    color: #00254d;
    text-decoration: underline;
}

/* Form umum */
.form {
    padding: 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.form input, .form select {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 16px;
}

.form button {
    width: 100%;
    padding: 12px;
    background-color: #003366;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.form button:hover {
    background-color: #00254d;
}

/* Tabel */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 30px;
}

.table th, .table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.table th {
    background: #003366;
    color: white;
}

.table tr:nth-child(even) {
    background: #f9f9f9;
}

/* Gambar cover buku */
.table .cover-img {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
}

/* Tombol aksi */
.action-btn {
    padding: 6px 10px;
    margin: 0 2px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.edit-btn {
    background-color: #ffc107;
    color: #212529;
}

.delete-btn {
    background-color: #dc3545;
    color: white;
}

.delete-btn:hover {
    background-color: #c82333;
}

.edit-btn:hover {
    background-color: #e0a800;
}

/* Tampilan tidak ada data */
.no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        margin: 20px;
        border-radius: 12px;
    }
    
    header, .login-header {
        padding: 20px;
        font-size: 20px;
    }
    
    .form {
        padding: 25px;
    }
    
    .table {
        margin: 10px 15px;
        font-size: 14px;
    }
    
    .table th, .table td {
        padding: 8px;
    }
    
    nav a {
        display: block;
        margin: 5px 0;
    }
}