/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Container Global */
.container {
    max-width: 1000px;
    width: 100%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Header Dashboard */
header {
    background: rgba(0, 0, 0, 0.3);
    color: white;
    padding: 20px;
    text-align: center;
    font-size: 1.6em;
    font-weight: 600;
}

/* Form Card (Login, Register, Tambah/Edit Produk) */
.form-container {
    max-width: 500px;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    text-align: center;
    margin: 40px auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-container h2 {
    margin-bottom: 20px;
    color: #4a5568;
    font-weight: 600;
}

.form-container input,
.form-container textarea,
.form-container select {
    width: 100%;
    padding: 14px;
    margin: 10px 0;
    border: 1px solid #cbd5e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.form-container input:focus,
.form-container textarea:focus,
.form-container select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.form-container button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px;
    width: 100%;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 10px;
}

.form-container button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.message {
    background: rgba(252, 165, 165, 0.8);
    color: #c53030;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-weight: 500;
}

/* Link Register/Login */
.form-container p a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.form-container p a:hover {
    text-decoration: underline;
}

/* Navigation Dashboard */
.nav {
    display: flex;
    justify-content: center;
    padding: 20px;
    gap: 15px;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.1);
}

.nav a {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav a:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

/* Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
    background: rgba(255, 255, 255, 0.8);
}

th, td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background: rgba(102, 126, 234, 0.2);
    color: #2d3748;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8em;
}

tr:hover {
    background: rgba(102, 126, 234, 0.1);
}

img {
    max-width: 80px;
    max-height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* Action Buttons */
a[href^="edit"], a[href^="delete"] {
    padding: 6px 12px;
    font-size: 0.85em;
    border-radius: 6px;
    margin-right: 5px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: all 0.2s ease;
}

a[href^="edit"] {
    background: #48bb78;
}

a[href^="edit"]:hover {
    background: #38a169;
    transform: scale(1.05);
}

a[href^="delete"] {
    background: #e53e3e;
}

a[href^="delete"]:hover {
    background: #c53030;
    transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 10px;
    }

    .form-container {
        padding: 20px;
        margin: 20px;
    }

    .nav {
        flex-direction: column;
        align-items: center;
    }

    table {
        display: block;
        overflow-x: auto;
    }

    tbody tr {
        display: flex;
        flex-direction: column;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        margin: 10px 10px 0;
        padding: 10px;
        background: rgba(255, 255, 255, 0.9);
    }

    thead { display: none; }

    td {
        border: none;
        display: flex;
        justify-content: space-between;
        padding: 6px 0;
    }

    td:before {
        content: attr(data-label) ": ";
        font-weight: bold;
        text-transform: capitalize;
    }

    img {
        max-width: 60px;
        max-height: 60px;
    }
}

/* Google Font Import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');