* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2ecc71;
    --primary-dark: #27ae60;
    --secondary-color: #3498db;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --dark-color: #2c3e50;
    --light-bg: #f8f9fa;
    --border-color: #e0e0e0;
    --text-dark: #333;
    --text-light: #666;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-card {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header .logo-books {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

.login-header .book {
    width: 40px;
    height: 40px;
    font-size: 22px;
}

.login-header h1 {
    font-size: 28px;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.login-header p {
    color: var(--text-light);
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.login-form label i {
    margin-right: 8px;
    color: var(--primary-color);
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-login:hover {
    background: var(--primary-dark);
}

.login-footer {
    margin-top: 20px;
    text-align: center;
}

.back-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-link:hover {
    text-decoration: underline;
}

/* Admin Dashboard Layout */
.admin-body {
    display: flex;
    min-height: 100vh;
    background: var(--light-bg);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--dark-color);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-header .logo-books {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
}

.sidebar-header .book {
    width: 32px;
    height: 32px;
    font-size: 18px;
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 5px;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-left: 3px solid var(--primary-color);
}

.sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-logout {
    width: 100%;
    padding: 12px;
    background: var(--danger-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.3s ease;
}

.btn-logout:hover {
    background: #c0392b;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    flex: 1;
    min-height: 100vh;
}

.top-header {
    background: var(--white);
    padding: 20px 30px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-header h1 {
    font-size: 24px;
    color: var(--text-dark);
}

.header-actions {
    display: flex;
    gap: 12px;
}

.btn-save-all,
.btn-reset {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-save-all {
    background: var(--primary-color);
    color: var(--white);
}

.btn-save-all:hover {
    background: var(--primary-dark);
}

.btn-reset {
    background: var(--warning-color);
    color: var(--white);
}

.btn-reset:hover {
    background: #e67e22;
}

.content-wrapper {
    padding: 30px;
}

.admin-section {
    display: none;
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.admin-section.active {
    display: block;
}

.admin-card {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.section-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.section-header h2 {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.section-header p {
    color: var(--text-light);
    font-size: 14px;
}

/* Dashboard Stats */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 24px;
}

.stat-info h3 {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 5px;
    font-weight: normal;
}

.stat-info p {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}

.info-box {
    background: #e8f5e9;
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 8px;
}

.info-box h3 {
    margin-bottom: 15px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-box ul {
    list-style: none;
    padding-left: 0;
}

.info-box li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: var(--text-light);
}

.info-box li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
}

.form-control {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.subsection-title {
    font-size: 20px;
    margin: 30px 0 20px;
    color: var(--text-dark);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

/* Features Editor */
.features-editor {
    display: grid;
    gap: 20px;
}

.feature-edit-item {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.feature-edit-item h4 {
    margin-bottom: 15px;
    color: var(--text-dark);
    font-size: 16px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Process Steps Editor */
.process-step-item {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 2px solid var(--border-color);
}

.process-step-item h4 {
    margin-bottom: 15px;
    color: var(--text-dark);
}

/* RDM Features Editor */
.rdm-feature-item {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 2px solid var(--border-color);
}

.rdm-feature-item h4 {
    margin-bottom: 15px;
    color: var(--text-dark);
}

/* FAQ Editor */
.faq-edit-item {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 2px solid var(--border-color);
}

.faq-edit-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.faq-edit-item h4 {
    color: var(--text-dark);
    font-size: 16px;
}

.btn-delete {
    padding: 6px 12px;
    background: var(--danger-color);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-delete:hover {
    background: #c0392b;
}

/* Blog Editor */
.blog-edit-item {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 2px solid var(--border-color);
}

.blog-edit-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.blog-edit-item h4 {
    color: var(--text-dark);
    font-size: 16px;
}

/* Buttons */
.btn-add {
    padding: 12px 24px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease;
    margin-top: 20px;
}

.btn-add:hover {
    background: var(--primary-dark);
}

/* Color Picker */
.color-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-picker {
    width: 60px;
    height: 40px;
    padding: 0;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
}

.color-text {
    flex: 1;
    font-family: monospace;
    font-size: 13px;
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-light);
    font-style: italic;
}

/* Preview Box */
.preview-box {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border: 2px dashed var(--border-color);
}

.preview-box h4 {
    margin-bottom: 15px;
    color: var(--text-dark);
    font-size: 14px;
}

.logo-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.logo-preview img {
    max-height: 60px;
    width: auto;
}

.logo-preview span {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

select.form-control {
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .top-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .header-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Book Styles (reused from main site) */
.book {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.book-r {
    background-color: #e74c3c;
}

.book-d {
    background-color: #3498db;
}

.book-m {
    background-color: #2ecc71;
}

/* Member Management Styles */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.card-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--text-dark);
}

.btn-refresh {
    padding: 8px 16px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease;
}

.btn-refresh:hover {
    background: #2980b9;
}

.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-table thead {
    background: var(--dark-color);
    color: white;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
    font-size: 14px;
}

.data-table tbody tr:hover {
    background: var(--bg-light);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table .empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    font-style: italic;
}

.data-table code {
    background: var(--bg-light);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--primary-color);
}

.data-table a {
    color: var(--secondary-color);
    text-decoration: none;
}

.data-table a:hover {
    text-decoration: underline;
}

.badge {
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.btn-action {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    margin-right: 5px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-approve {
    background: var(--primary-color);
    color: white;
}

.btn-approve:hover {
    background: var(--primary-dark);
}

.btn-reject {
    background: var(--danger-color);
    color: white;
}

.btn-reject:hover {
    background: #c0392b;
}

.btn-view {
    background: var(--secondary-color);
    color: white;
}

.btn-view:hover {
    background: #2980b9;
}

.section-header {
    margin-bottom: 30px;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 20px;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--danger-color);
}

.modal-body {
    padding: 25px;
}

.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
}

.modal-body label i {
    margin-right: 8px;
    color: var(--primary-color);
}

.modal-body .required {
    color: var(--danger-color);
}

.modal-body .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.modal-body .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.modal-body small {
    display: block;
    margin-top: 5px;
    color: var(--text-light);
    font-size: 12px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-secondary {
    padding: 10px 20px;
    background: var(--light-bg);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.btn-primary {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

/* Button Kerjakan */
.btn-kerja {
    background: var(--warning-color);
    color: white;
}

.btn-kerja:hover {
    background: #e67e22;
}

/* Badge Status */
.badge-processing {
    background: #d1ecf1;
    color: #0c5460;
}

/* Detail View Styles */
.detail-actions {
    margin-bottom: 20px;
    text-align: right;
}

.btn-copy-all {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-copy-all:hover {
    background: var(--primary-dark);
}

.detail-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-row {
    display: grid;
    grid-template-columns: 150px 1fr auto;
    gap: 15px;
    align-items: center;
    padding: 12px;
    background: var(--light-bg);
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

.detail-label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
}

.detail-value {
    color: var(--text-light);
    font-size: 14px;
    word-break: break-all;
    padding: 4px 8px;
    background: white;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    cursor: text;
    user-select: all;
}

.detail-value:hover {
    border-color: var(--primary-color);
}

.btn-copy-item {
    padding: 6px 10px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-copy-item:hover {
    background: #2980b9;
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: none;
    }

    .modal-header {
        padding: 15px 20px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-footer {
        padding: 15px 20px;
        flex-direction: column;
    }

    .btn-secondary,
    .btn-primary {
        width: 100%;
    }
    
    .detail-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .detail-label {
        font-size: 12px;
    }
    
    .detail-value {
        font-size: 13px;
    }
    
    .btn-copy-item {
        width: 100%;
        justify-self: start;
    }
}


