/* File: public/css/style.css */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #f5f7fa;
    --text-color: #333;
    --border-color: #dce1e6;
    --bg-color: #ffffff;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
body {
    font-family: var(--font-family);
    background-color: var(--secondary-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
}
.main-container {
    width: 100%;
}
.container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    gap: 20px;
    margin: 20px auto;
    padding: 0 20px;
    box-sizing: border-box;
}
.form-container, .result-container {
    background-color: var(--bg-color);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
}
.form-container {
    flex: 1;
    min-width: 320px;
}
.result-container {
    flex: 2;
}
h1, h2 {
    color: var(--primary-color);
    padding-bottom: 10px;
    margin-top: 0;
}
h1 {
    border-bottom: 2px solid var(--secondary-color);
}
.form-group {
    margin-bottom: 20px;
}
label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}
input[type="text"], input[type="email"], input[type="password"], textarea, select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, textarea:focus, select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
    outline: none;
}
textarea {
    resize: vertical;
    min-height: 80px;
}
button {
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}
button:hover {
    background-color: #357abd;
}
button:active {
    transform: scale(0.98);
}
.article-preview {
    min-height: 400px;
    max-height: 60vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 6px;
    background-color: #fdfdfd;
}
.error-message, .success-message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.error-message {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #c62828;
}
.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
@media (max-width: 900px) {
    .container {
        flex-direction: column;
    }
}

/* === Gaya untuk Navbar & Sistem User === */
.navbar {
    background-color: var(--bg-color);
    padding: 0 40px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    width: 100%;
    box-sizing: border-box;
}
.navbar-brand {
    font-weight: bold;
    font-size: 1.2em;
    color: var(--primary-color);
}
.navbar-links {
    display: flex;
    align-items: center;
    gap: 25px;
}
.navbar-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.3s, border-bottom-color 0.3s;
}
.navbar-links a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}
.navbar-links span {
    color: #777;
    margin-left: 15px;
}
.logout-btn {
    background-color: #fdecec;
    color: #c53030 !important;
    padding: 8px 15px;
    border-radius: 6px;
    border-bottom: none !important;
    transition: background-color 0.3s;
}
.logout-btn:hover {
    background-color: #f9caca;
    color: #c53030 !important;
}

/* Gaya untuk tabel di history & admin */
.history-table {
    width: 100%;
    border-collapse: collapse;
}
.history-table th, .history-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}
.history-table th {
    background-color: var(--secondary-color);
}
.article-link {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
}
.article-link:hover {
    text-decoration: underline;
}
.status-pending {
    background-color: #fffbea;
    color: #b45309;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.9em;
}
.status-active {
    background-color: #dcfce7;
    color: #166534;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.9em;
}
.btn-activate {
    background-color: #2563eb;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9em;
}

/* === Gaya untuk Halaman Profil & Hasil Terpisah === */
fieldset {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}
legend {
    font-weight: 600;
    color: var(--primary-color);
    padding: 0 10px;
}
.wa-button {
    display: inline-block;
    padding: 12px 20px;
    background-color: #25D366;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}
.wa-button:hover {
    background-color: #1DA851;
}
.result-item-container {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 20px;
}
.result-item-header {
    margin-bottom: 10px;
}
.result-item-header strong {
    color: var(--primary-color);
    font-size: 1.1em;
    font-weight: 600;
}
.result-item-content {
    margin: 0;
    color: #333;
    font-size: 1.1em;
    line-height: 1.6;
}
.result-item-footer {
    margin-top: 15px;
    text-align: right;
}
.btn-copy, .result-actions button {
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 600;
    background-color: #eef2f7;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.3s;
    width: auto;
}
.btn-copy:hover, .result-actions button:hover {
    background-color: #dce1e6;
}
.result-actions {
    display: inline-flex;
    gap: 10px;
}
#copy-wordpress-btn {
    background-color: #2c3e50;
    color: white;
    border-color: #2c3e50;
}
#copy-wordpress-btn:hover {
    background-color: #1a2531;
}

/* === Gaya untuk Loader Dinamis === */
#loader-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 50px;
    text-align: center;
}
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #eef2f7;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
.loader-text {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--primary-color);
}
