/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
button,
input,
textarea,
select {
    font-family: 'Inter', sans-serif;
}

/* Typography & Layout Global */
body {
    background-color: #0d1117;
    color: #e6e6e6;
    line-height: 1.6;
    padding: 20px;
}

a {
    color: #58a6ff;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font-family: inherit;
    font-size: 1em;
    outline: none;
}

/* Header */
header {
    background: #181f2b;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

header h1 {
    font-size: 1.5rem;
    margin: 0;
    color: #ffffff;
}

/* Halaman Login */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-box {
    background-color: #212632;
    padding: 30px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: white;
}

.login-box h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: #ffffff;
    font-weight: 600;
    text-align: center;
}

.login-box .error-box {
    background: #ff6e6e;
    color: black;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

.login-box input[type="text"],
.login-box input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: none;
    background: #2a3042;
    color: white;
    font-size: 14px;
    border-radius: 6px;
    margin-bottom: 15px;
    transition: background 0.3s ease;
}

.login-box input[type="text"]:focus,
.login-box input[type="password"]:focus {
    background: #343b58;
    outline: none;
}

.login-box button {
    width: 100%;
    padding: 12px;
    background: #2f81ff;
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

.login-box button:hover {
    background: #3c94ff;
}

.btn-logout {
    background-color: #ff6e6e;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-logout:hover {
    background-color: #ff3b3b;
    color: #fff;
}

/* Kontainer Utama */
.container {
    max-width: 1200px;
    margin: auto;
    background: #181f2b;
    padding: 30px;
    border-radius: 12px;
    margin-top: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

h2 {
    margin-bottom: 20px;
    font-weight: 600;
    color: #ffffff;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
}

/* Form Buat Redirect */
form input[type="text"],
form input[type="url"] {
    padding: 12px 15px;
    border: none;
    background: #2a3042;
    color: white;
    font-size: 14px;
    border-radius: 6px;
    margin-bottom: 15px;
    width: 100%;
    transition: background 0.3s ease;
}

form input[type="text"]:focus,
form input[type="url"]:focus {
    background: #343b58;
    outline: none;
}

form button {
    padding: 12px 20px;
    background: #238636;
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

form button:hover {
    background: #2ea045;
}

/* Kolom Pencarian */
.search-box {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: 8px;
    background: #212632;
    color: white;
    font-size: 14px;
    margin-bottom: 20px;
    transition: background 0.3s;
}

.search-box:focus {
    background: #2a3042;
    outline: none;
}

/* Responsive Table - Desktop */
.table-desktop table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    word-break: break-word;
    background: #212632;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.table-desktop th {
    background-color: #2a3042;
    color: #fff;
    font-weight: 600;
    text-align: left;
    padding: 15px;
    border-bottom: 1px solid #30364d;
}

.table-desktop td {
    padding: 15px;
    border-bottom: 1px solid #30364d;
    color: #ddd;
}

.table-desktop tr:hover {
    background-color: #2a3042;
}

/* Card untuk Mobile */
.cards-mobile {
    display: none;
    flex-direction: column;
    gap: 20px;
}

.card {
    background-color: #212632;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
}

.card-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 15px;
    margin-bottom: 10px;
}

.label {
    font-weight: 600;
    min-width: 100px;
    color: #aaa;
}

.value {
    flex-grow: 1;
    text-align: right;
    word-break: break-all;
    color: #58a6ff;
}

.value a {
    color: #58a6ff;
    text-decoration: none;
}

.card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.card-actions button,
.card-actions a {
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

/* Tombol Copy */
.btn-copy {
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    margin-left: 5px;
}

.btn-copy:hover {
    color: #fff;
}

.copy-container {
    display: flex;
    align-items: center;
}

.copy-container a {
    margin-right: 5px;
}

/* Tombol Edit & Hapus */
.btn-edit,
.btn-delete {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    color: white;
    transition: background 0.3s ease;
}

.btn-edit {
    background: #2f81ff;
}

.btn-edit:hover {
    background: #3c94ff;
}

.btn-delete {
    background: #ff6e6e;
}

.btn-delete:hover {
    background: #ff3b3b;
}

/* Modal Edit */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    background-color: #181f2b;
    margin: 10% auto;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    color: white;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 600;
    color: #fff;
}

.close {
    float: right;
    cursor: pointer;
    font-size: 24px;
    color: #aaa;
}

.close:hover {
    color: #fff;
}

/* Media Query untuk Mobile */
@media (max-width: 768px) {
    .table-desktop {
        display: none;
    }

    .cards-mobile {
        display: flex;
    }

    .search-box {
        font-size: 14px;
        padding: 10px 15px;
    }
}