/* ============================================
   PERPUSTAKAAN ONLINE - Stylesheet
   ============================================ */

:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --success: #27ae60;
    --warning: #f39c12;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --border: #ddd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 20px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: #f1c40f;
}

.nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav a {
    color: var(--white);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    transition: all 0.3s;
}

.nav a:hover {
    background: rgba(255,255,255,0.2);
}

.nav .btn-login {
    background: var(--warning);
    color: var(--dark);
    font-weight: bold;
}

/* Main Content */
.main-content {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

/* Search & Filter Section */
.search-filter {
    background: var(--white);
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.search-filter h2 {
    margin-bottom: 20px;
    color: var(--primary);
}

.search-box {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.search-box input[type="text"] {
    flex: 1;
    min-width: 250px;
    padding: 12px 20px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.search-box input[type="text"]:focus {
    outline: none;
    border-color: var(--secondary);
}

.search-box select {
    padding: 12px 20px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    min-width: 200px;
    cursor: pointer;
}

.search-box button {
    padding: 12px 30px;
    background: var(--secondary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background: var(--primary);
}

/* Jurnal Grid */
.jurnal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.jurnal-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.jurnal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.jurnal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 20px;
    color: var(--white);
}

.kategori-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.jurnal-header h3 {
    font-size: 1.2rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

.jurnal-body {
    padding: 20px;
}

.jurnal-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #666;
}

.jurnal-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.jurnal-desc {
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.jurnal-footer {
    display: flex;
    gap: 10px;
}

.btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
    display: inline-block;
}

.btn-download {
    background: var(--success);
    color: var(--white);
}

.btn-download:hover {
    background: #219a52;
}

.btn-detail {
    background: var(--secondary);
    color: var(--white);
}

.btn-detail:hover {
    background: #2980b9;
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-card h3 {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 5px;
}

.stat-card p {
    color: #666;
    font-size: 0.95rem;
}

/* Table Styles */
.table-container {
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.table-header h2 {
    color: var(--primary);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--primary);
    color: var(--white);
}

th, td {
    padding: 15px;
    text-align: left;
}

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

tbody tr:hover {
    background: #f8f9fa;
}

.status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

/* Form Styles */
.form-container {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--success);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-submit:hover {
    background: #219a52;
}

.btn-cancel {
    background: #95a5a6;
    color: var(--white);
}

.btn-cancel:hover {
    background: #7f8c8d;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 20px;
}

.login-box {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 30px;
}

.login-logo {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 20px;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 5px;
    text-decoration: none;
    color: var(--primary);
    transition: all 0.3s;
}

.pagination a:hover,
.pagination .active {
    background: var(--secondary);
    color: var(--white);
    border-color: var(--secondary);
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 30px 0;
    text-align: center;
    margin-top: 60px;
}

.footer p {
    opacity: 0.8;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* Action Buttons in Table */
.action-btns {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
}

.btn-edit {
    background: var(--warning);
    color: var(--dark);
}

.btn-delete {
    background: var(--accent);
    color: var(--white);
}

.btn-view {
    background: var(--secondary);
    color: var(--white);
}

/* Responsive */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-box select {
        width: 100%;
    }
    
    .jurnal-grid {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    table {
        min-width: 600px;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
}

/* Breadcrumb */
.breadcrumb {
    padding: 15px 0;
    color: #666;
}

.breadcrumb a {
    color: var(--secondary);
    text-decoration: none;
}

.breadcrumb span {
    margin: 0 10px;
}

/* Detail Page */
.detail-container {
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.detail-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 30px;
    color: var(--white);
}

.detail-header h1 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.detail-body {
    padding: 30px;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.detail-meta div span {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.detail-meta div strong {
    color: var(--dark);
    font-size: 1.1rem;
}

.detail-desc {
    line-height: 1.8;
    color: #555;
    margin-bottom: 25px;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--secondary);
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* Link Card Styles (Jurnal Eksternal) */
.link-card {
    border: 2px solid transparent;
}

.link-card:hover {
    border-color: var(--secondary);
}

.link-card .jurnal-header {
    display: flex;
    flex-direction: column;
    min-height: 100px;
    justify-content: center;
}

.link-card .jurnal-header h3 {
    font-size: 1.4rem;
    margin: 0;
}

.link-card .jurnal-footer {
    margin-top: auto;
}

.link-card .btn-download {
    background: linear-gradient(135deg, var(--secondary) 0%, #2980b9 100%);
    font-weight: bold;
}

.link-card .btn-download:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1a5276 100%);
    transform: scale(1.02);
}

/* Info Section */
.info-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-top: 50px;
}

.info-section h2 {
    color: var(--primary);
    margin-bottom: 20px;
}

.info-step {
    text-align: center;
    padding: 20px;
}

.info-step-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.info-step h3 {
    color: var(--secondary);
    margin-bottom: 10px;
}

.info-step p {
    color: #666;
}

