@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --secondary: #0f172a;
    --success: #10b981;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --info: #06b6d4;
    --info-light: #ecfeff;
    
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-premium: 0 20px 25px -5px rgba(79, 70, 229, 0.1), 0 8px 10px -6px rgba(79, 70, 229, 0.1);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* Utility Classes */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Auth Layout */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 40%);
}

.auth-card {
    background: var(--bg-card);
    width: 100%;
    max-width: 450px;
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--info));
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary);
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 16px;
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary);
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--secondary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background-color: var(--bg-main);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-error {
    color: var(--danger);
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 14px;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.btn-secondary {
    background-color: var(--secondary);
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: #1e293b;
    transform: translateY(-1px);
}

.btn-light {
    background-color: #f1f5f9;
    color: var(--secondary);
    border: 1px solid var(--border-color);
}

.btn-light:hover {
    background-color: #e2e8f0;
}

.btn-danger {
    background-color: var(--danger);
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.btn-block {
    width: 100%;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-pending {
    background-color: var(--warning-light);
    color: var(--warning);
}

.badge-diproses {
    background-color: var(--info-light);
    color: var(--info);
}

.badge-selesai {
    background-color: var(--success-light);
    color: var(--success);
}

.badge-ditolak {
    background-color: var(--danger-light);
    color: var(--danger);
}

/* Alert Notification */
.alert {
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background-color: var(--success-light);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-danger {
    background-color: var(--danger-light);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* App Header & Layout */
.app-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-container {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--info));
    color: #ffffff;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
}

.logo-text {
    font-size: 18px;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 14px;
    color: var(--text-muted);
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background-color: var(--primary-light);
}

.user-profile-menu {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    text-align: right;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary);
}

.user-role {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: capitalize;
}

/* Dashboard Grid & Layout */
.dashboard-layout {
    padding: 40px 0;
    min-height: calc(100vh - 72px);
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -0.5px;
}

.page-title p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

/* Statistics Widgets */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-icon-total { background-color: var(--primary-light); color: var(--primary); }
.stat-icon-pending { background-color: var(--warning-light); color: var(--warning); }
.stat-icon-proses { background-color: var(--info-light); color: var(--info); }
.stat-icon-selesai { background-color: var(--success-light); color: var(--success); }
.stat-icon-ditolak { background-color: var(--danger-light); color: var(--danger); }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Content Card */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary);
}

.card-body {
    padding: 24px;
}

/* Filters bar */
.filter-bar {
    background-color: #f1f5f9;
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
}

.filter-control {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: #ffffff;
    font-size: 14px;
}

/* Grid Laporan for Cards style */
.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.report-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.report-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.report-img-wrapper {
    width: 100%;
    height: 180px;
    position: relative;
    background-color: #e2e8f0;
}

.report-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.report-status-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    box-shadow: var(--shadow-md);
}

.report-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.report-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.report-type {
    font-weight: 600;
    color: var(--primary);
}

.report-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.report-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.report-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.report-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.reporter-avatar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.avatar-initial {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
}

/* Detail View Layout */
.detail-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
}

@media (max-width: 992px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

.detail-img-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background-color: #f1f5f9;
}

.detail-img-card img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.detail-content-card {
    padding: 30px;
}

.detail-header {
    margin-bottom: 24px;
}

.detail-meta-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    background-color: var(--bg-main);
    border-radius: var(--radius-md);
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.meta-val {
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary);
    margin-top: 2px;
}

.detail-desc {
    margin-bottom: 30px;
}

.detail-desc h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.detail-desc p {
    color: #334155;
    font-size: 15px;
    line-height: 1.6;
}

/* Table Style */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th {
    background-color: var(--bg-main);
    padding: 16px 20px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
}

.table td {
    padding: 16px 20px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background-color: #f8fafc;
}

/* Pagination */
.pagination-wrapper {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    list-style: none;
    padding-left: 0;
    border-radius: var(--radius-md);
    gap: 4px;
}

.page-item {
    display: inline;
}

.page-link {
    position: relative;
    display: block;
    padding: 10px 16px;
    color: var(--secondary);
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm) !important;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.page-link:hover {
    color: var(--primary);
    background-color: var(--primary-light);
    border-color: var(--primary);
}

.page-item.active .page-link {
    z-index: 3;
    color: #ffffff;
    background-color: var(--primary);
    border-color: var(--primary);
}

.page-item.disabled .page-link {
    color: var(--text-muted);
    pointer-events: none;
    background-color: var(--bg-main);
    border-color: var(--border-color);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 8px;
}

.empty-text {
    color: var(--text-muted);
    font-size: 14px;
    max-width: 400px;
    margin: 0 auto 20px;
}

/* Responsive Grid Utility */
.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Responsive adjust */
@media (max-width: 992px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
        gap: 15px;
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .user-profile-menu {
        width: 100%;
        justify-content: space-between;
        border-top: 1px solid var(--border-color);
        padding-top: 10px;
    }
    
    .dashboard-layout {
        padding: 20px 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .grid-2-col {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    .filter-bar button, .filter-bar a {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .auth-card {
        padding: 24px 16px;
    }
    
    .detail-meta-list {
        grid-template-columns: 1fr;
    }
    
    .detail-meta-list .meta-item {
        grid-column: span 1 !important;
    }
}

/* Button Group Responsive */
.btn-group-responsive {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 576px) {
    .btn-group-responsive {
        width: 100%;
    }
    .btn-group-responsive a, .btn-group-responsive button {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* Form Actions Button Alignment */
.form-actions {
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

@media (max-width: 576px) {
    .form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    .form-actions a, .form-actions button {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}
