@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    --primary: #15803d; /* Hijau alam */
    --primary-hover: #166534; /* Hijau gelap */
    --accent: #22c55e; /* Hijau terang */
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --bg: #f8fafc; /* Latar belakang hampir putih (sangat bersih) */
    --surface: #ffffff; /* Putih bersih untuk card */
    --text-main: #1f2937;
    --text-muted: #4b5563;
    --border: #e2e8f0;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigasi Atas */
.top-nav {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-badge {
    background-color: #dcfce7;
    color: #166534;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

/* Hero Section (Judul & Logo) */
.hero-section {
    text-align: center;
    padding: 50px 0 40px 0;
}

.logo {
    width: 100px; /* Ukuran logo UNIMED */
    height: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.hero-section h4 {
    color: var(--primary);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.hero-section h2 {
    color: var(--text-main);
    font-size: 28px;
    font-weight: 700;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.btn-login { background-color: var(--surface); color: var(--primary); border: 1px solid var(--primary); }
.btn-login:hover { background-color: var(--primary); color: white; }
.btn-logout { background-color: white; color: var(--danger); border: 1px solid var(--danger); }
.btn-logout:hover { background-color: var(--danger); color: white; }
.btn-add-nav { background-color: var(--primary); color: white; margin-right: 15px; }

/* Cards Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding-bottom: 60px;
}

.card {
    background: var(--surface);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border);
    border-top: 4px solid var(--primary); /* Aksen hijau di atas card */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative; /* Penting agar seluruh card bisa diklik */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    border-color: #bbf7d0;
}

.card h3 { font-size: 18px; margin-bottom: 5px; color: var(--text-main); }
.card .nim-text { color: var(--primary); font-weight: 600; font-size: 14px; margin-bottom: 20px; flex-grow: 1; }

.card-action { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    margin-top: auto; 
    padding-top: 15px; 
    border-top: 1px solid var(--border); 
}

/* Membuat seluruh card menjadi link ke Canva */
.link-detail { 
    color: var(--primary); 
    text-decoration: none; 
    font-weight: 700; 
    font-size: 14px; 
    transition: color 0.3s;
}
.link-detail::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* Memastikan tombol hapus tetap bisa ditekan (berada di atas area klik profil) */
.link-delete { 
    color: var(--danger); 
    text-decoration: none; 
    font-size: 14px; 
    font-weight: 600; 
    position: relative;
    z-index: 10; 
}
.link-delete:hover { color: var(--danger-hover); }

/* Modal Pop Up */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(17, 24, 39, 0.5);
    backdrop-filter: blur(5px);
    align-items: center; justify-content: center;
}

.modal-card {
    background-color: var(--surface);
    padding: 35px;
    border-radius: 20px;
    width: 90%; max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: modalScaleUp 0.3s ease-out;
}

@keyframes modalScaleUp {
    from { transform: scale(0.95) translateY(10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.close-btn {
    position: absolute; top: 15px; right: 15px;
    width: 32px; height: 32px;
    border-radius: 50%; background-color: #f1f5f9;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: #64748b; border: none; cursor: pointer;
    transition: all 0.2s;
}
.close-btn:hover { background-color: #fee2e2; color: #ef4444; }

.modal-card .form-group { display: flex; flex-direction: column; gap: 15px; }
.modal-card input {
    width: 100%; padding: 14px 18px;
    border: 1px solid #cbd5e1; border-radius: 12px;
    font-size: 15px; background-color: #f8fafc;
    transition: all 0.3s ease;
}
.modal-card input:focus {
    background-color: var(--surface); border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.15); outline: none;
}
.modal-card .btn-add {
    background-color: var(--primary); color: white;
    padding: 14px; border-radius: 12px; font-size: 16px; width: 100%; margin-top: 20px;
}
.modal-card .btn-add:hover { background-color: var(--primary-hover); }
.empty-state { text-align: center; color: var(--text-muted); padding: 40px; font-size: 16px; }