:root {
    --primary: #047857;
    --primary-hover: #065f46;
    --secondary: #10b981;
    --bg-color: #f4f7f6;
    --surface: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --danger: #ef4444;
    --success: #10b981;
    --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);
    --radius: 0.375rem;
    --topbar-bg: #064e3b;
    --footer-bg: #022c22;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Google Sans', 'Product Sans', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Layout Utilities */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.container-sm {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Topbar Navbar */
.topbar {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand img {
    height: 40px;
}

.brand-text {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text-main);
}

.brand-line-1, .brand-line-2 {
    display: inline;
}
.brand-space {
    display: inline;
}

@media (max-width: 768px) {
    .brand-line-1, .brand-line-2 {
        display: block;
    }
    .brand-space {
        display: none;
    }
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface);
        padding: 1.5rem 1rem;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-sm);
        gap: 1.25rem;
        align-items: flex-start;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links .btn-nav {
        width: 100%;
        text-align: center;
    }
}

.nav-link {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary);
    text-decoration: none;
}

.btn-nav {
    background-color: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.9rem;
}

.btn-nav:hover {
    background-color: var(--primary-hover);
    color: white;
    text-decoration: none;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--topbar-bg) 0%, var(--primary) 100%);
    color: white;
    padding: 4rem 1rem;
    text-align: left;
}

.hero-content {
    max-width: 1100px;
    margin: 0 auto;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
}

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

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    max-width: 800px;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* Section Wrapper */
.section {
    padding: 3rem 1rem;
}

.section-bg {
    background-color: var(--surface);
}

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .grid-3, .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Cards */
.info-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.info-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.info-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.card {
    background-color: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: var(--radius);
    transition: all 0.15s ease-in-out;
    cursor: pointer;
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    text-decoration: none;
}

.btn-outline {
    color: white;
    background-color: transparent;
    border-color: white;
}

.btn-outline:hover {
    background-color: rgba(255,255,255,0.1);
    text-decoration: none;
}

.btn-secondary {
    color: var(--text-main);
    background-color: var(--surface);
    border-color: var(--border);
}

.btn-secondary:hover {
    background-color: var(--bg-color);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.required {
    color: var(--danger);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-main);
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    outline: 0;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.1);
}

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

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
}

.file-upload-wrapper {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    background-color: #f8fafc;
    transition: all 0.2s ease;
    cursor: pointer;
}

.file-upload-wrapper:hover {
    border-color: var(--primary);
    background-color: #f0f9ff;
}

.file-upload-wrapper input[type="file"] {
    display: none;
}

.file-list {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--bg-color);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.text-sm { font-size: 0.875rem; }
.text-muted { color: var(--text-muted); }

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.alert-success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 9999px;
}

.status-diterima { background-color: #fef3c7; color: #92400e; }
.status-didisposisikan { background-color: #e0f2fe; color: #075985; }
.status-ditindaklanjuti { background-color: #dcfce3; color: #166534; }

/* Tracking Result Styles */
.tracking-result {
    margin-top: 2rem;
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}

.detail-row {
    display: flex;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border);
}

.detail-label {
    width: 200px;
    font-weight: 500;
    color: var(--text-muted);
}

.detail-value {
    flex: 1;
    font-weight: 600;
}

/* Footer */
.footer {
    background-color: var(--footer-bg);
    color: white;
    padding: 2rem 1rem;
    margin-top: 0;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #cbd5e1;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    .footer-content > div {
        text-align: center !important;
    }
    .footer-content > div > div {
        white-space: normal !important;
    }
}

/* Admin Dashboard Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background-color: var(--topbar-bg);
    color: white;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    position: relative;
}

.admin-sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-weight: 700;
    font-size: 1.25rem;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    flex: 1;
}

.admin-nav-item {
    padding: 0.75rem 1.5rem;
    color: rgba(255,255,255,0.8);
    transition: all 0.2s;
}

.admin-nav-item:hover, .admin-nav-item.active {
    background-color: rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
}

.admin-main {
    flex: 1;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-header {
    background-color: var(--surface);
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-content {
    padding: 2rem;
    flex: 1;
}

/* Hamburger for admin sidebar on mobile */
.admin-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
    padding: 0.25rem;
    line-height: 1;
}

/* Sidebar overlay backdrop */
.admin-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

/* Sidebar close button (mobile only) */
.admin-sidebar-close {
    display: none;
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    position: absolute;
    top: 1.25rem;
    right: 1rem;
}

.admin-sidebar-close:hover {
    color: white;
}

/* Sidebar greeting: hidden on desktop, shown on mobile */
.admin-sidebar-greeting {
    display: none;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table th, .table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

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

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

/* Mobile responsive for admin */
@media (max-width: 768px) {
    .admin-sidebar-toggle {
        display: block;
    }

    .admin-sidebar-close {
        display: block;
    }

    .admin-sidebar-overlay.active {
        display: block;
    }

    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 999;
        transform: translateX(-100%);
        width: 260px;
    }

    .admin-sidebar.active {
        transform: translateX(0);
    }

    .admin-sidebar-greeting {
        display: block;
    }

    .admin-greeting {
        display: none;
    }

    .admin-header {
        padding: 1rem;
    }

    .admin-content {
        padding: 1rem;
    }
}

@media (max-width: 640px) {
    .detail-row {
        flex-direction: column;
    }
    .detail-label {
        width: 100%;
        margin-bottom: 0.25rem;
    }
}
