/* assets/css/style.css */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #17a2b8;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.4;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    color: white;
    padding: 1rem 0;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 1.5rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--secondary-color);
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1rem;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-box h2 {
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 0.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-success {
    background-color: var(--success-color);
}

.btn-danger {
    background-color: var(--danger-color);
}

.btn-warning {
    background-color: var(--warning-color);
}

/* Dashboard */
.dashboard {
    padding: 2rem 0;
}

.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1rem;
    text-align: center;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-full-width {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1rem;
    transition: var(--transition);
    width: 100%;
    grid-column: 1 / -1; /* Span across all columns */
}

.card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.card h3 {
    margin-bottom: 0.25rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.card p {
    color: #666;
    margin-bottom: 0.5rem;
}

.card .btn {
    margin-top: 0.25rem !important;
}

/* Form Styles */
.form-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1rem;
    margin-bottom: 1rem;
}

.form-title {
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    text-align: center;
}

/* Table Styles */
.table-responsive {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 1rem;
    overflow-x: auto;
    transition: box-shadow 0.3s ease;
}

.table-responsive:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.table th,
.table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eef2f7;
    transition: background-color 0.2s ease;
}

.table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.table th:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--secondary-color);
}

.table tr {
    position: relative;
    overflow: hidden;
}

.table tr:not(:last-child):after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: rgba(0, 0, 0, 0.05);
}

.table tr:hover {
    background-color: #f8fafc;
    transform: scale(1.01);
    z-index: 1;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.table tr:hover td {
    color: var(--primary-color);
    font-weight: 500;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #f9fbfd;
}

.table-striped tbody tr:nth-of-type(odd):hover {
    background-color: #edf2f7;
}

/* Elegant card effect for table rows */
.table tbody tr {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 5px;
}

/* Special styling for action buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.action-buttons .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.action-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Styling for photo links */
.table a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.table a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Elegant header styling */
.table-container h2 {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    position: relative;
    padding-bottom: 0.25rem;
}

.table-container h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, var(--secondary-color), var(--primary-color));
    border-radius: 3px;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Footer */
footer {
    background: var(--dark-color);
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .logo {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .logo img {
        margin-right: 0 !important;
        margin-bottom: 0.5rem;
    }

    .nav-menu {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-menu li {
        margin: 0.5rem;
    }

    .card-container {
        grid-template-columns: 1fr;
    }

    .table {
        display: block;
        overflow-x: auto;
    }

    /* Ensure logo stays on top in all pages */
    [style*="height: 60px; margin-bottom: 0.5rem;"] {
        margin: 0 auto 0.5rem auto;
        display: block;
    }
}

/* Alert Styles */
.alert {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: var(--border-radius);
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Loading Spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: var(--border-radius);
    width: 80%;
    max-width: 600px;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: var(--border-radius);
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Gaya untuk password input container */
.password-input-container {
    position: relative;
}

.password-input-container input {
    padding-right: 40px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
}

.password-toggle:hover {
    color: #333;
}