/* ============================================
   PETA SPONSOR - Stylesheet
   Desain: Sederhana, profesional, responsif
   ============================================ */

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #64748b;
    --success: #16a34a;
    --success-light: #dcfce7;
    --danger: #dc2626;
    --danger-light: #fef2f2;
    --warning: #d97706;
    --warning-light: #fffbeb;
    --info: #0891b2;
    --info-light: #ecfeff;
    --bg: #f1f5f9;
    --bg-white: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --radius: 8px;
    --radius-sm: 4px;
    --sidebar-w: 250px;
    --header-h: 56px;

    /* Tier colors */
    --bronze: #cd7f32;
    --silver: #a8a9ad;
    --gold: #ffd700;
    --platinum: #e5e4e2;
}

html {
    font-size: 14px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

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

img {
    max-width: 100%;
    height: auto;
}

/* === Login Page === */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    padding: 1rem;
}

.login-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 400px;
}

.login-card h1 {
    text-align: center;
    margin-bottom: .25rem;
    color: var(--primary);
    font-size: 1.6rem;
}

.login-card .subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: .9rem;
}

.login-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-logo img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

/* === Layout === */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* === Sidebar === */
.sidebar {
    width: var(--sidebar-w);
    background: #1e293b;
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 1200;
    transition: transform 0.25s ease;
}

.sidebar-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: .75rem;
}

.sidebar-header img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.sidebar-header h2 {
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
}

.sidebar-nav {
    padding: .75rem 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem 1.25rem;
    color: #cbd5e1;
    font-size: .9rem;
    transition: background 0.15s, color 0.15s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255,255,255,0.08);
    color: #fff;
    text-decoration: none;
}

.sidebar-nav a.active {
    border-left: 3px solid var(--primary);
    padding-left: calc(1.25rem - 3px);
}

.sidebar-nav .nav-icon {
    width: 18px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-section {
    padding: .5rem 1.25rem .25rem;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #64748b;
    margin-top: .5rem;
}

/* === Main Content === */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === Top Header === */
.top-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1001;
}

.top-header h1 {
    font-size: 1.15rem;
    font-weight: 600;
}

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

.header-user {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
}

.header-user img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text);
    padding: .25rem;
}

/* === Content Area === */
.content {
    padding: 1.5rem;
    flex: 1;
}

/* === Cards === */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.25rem;
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body {
    padding: 1.25rem;
}

/* === Dashboard Stats === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: .25rem;
}

.stat-card .stat-label {
    font-size: .8rem;
    color: var(--text-light);
}

.stat-card.stat-primary { border-left: 4px solid var(--primary); }
.stat-card.stat-success { border-left: 4px solid var(--success); }
.stat-card.stat-danger  { border-left: 4px solid var(--danger); }
.stat-card.stat-warning { border-left: 4px solid var(--warning); }
.stat-card.stat-info    { border-left: 4px solid var(--info); }
.stat-card.stat-secondary { border-left: 4px solid var(--secondary); }

/* === Tables === */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: .65rem .75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: .85rem;
    white-space: nowrap;
}

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

table tbody tr:hover {
    background: #f8fafc;
}

/* === Badges === */
.badge {
    display: inline-block;
    padding: .2rem .55rem;
    border-radius: 9999px;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.badge-primary   { background: var(--primary-light); color: var(--primary); }
.badge-success   { background: var(--success-light); color: var(--success); }
.badge-danger    { background: var(--danger-light); color: var(--danger); }
.badge-warning   { background: var(--warning-light); color: var(--warning); }
.badge-info      { background: var(--info-light); color: var(--info); }
.badge-secondary { background: #f1f5f9; color: var(--secondary); }

.badge-bronze   { background: #fef3e2; color: var(--bronze); }
.badge-silver   { background: #f0f0f1; color: #71717a; }
.badge-gold     { background: #fef9c3; color: #a16207; }
.badge-platinum { background: #f0fdf4; color: #166534; }

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

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: .3rem;
    font-size: .85rem;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: .5rem .75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-family: inherit;
    color: var(--text);
    background: var(--bg-white);
    transition: border-color 0.15s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

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

select.form-control {
    appearance: auto;
}

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

.form-hint {
    font-size: .75rem;
    color: var(--text-light);
    margin-top: .2rem;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.15s;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    opacity: 0.85;
    text-decoration: none;
}

.btn-primary   { background: var(--primary); color: #fff; }
.btn-success   { background: var(--success); color: #fff; }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-warning   { background: var(--warning); color: #fff; }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-outline   { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: #f8fafc; }

.btn-sm {
    padding: .3rem .6rem;
    font-size: .78rem;
}

.btn-group {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

/* === Alerts === */
.alert {
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: .85rem;
    border: 1px solid;
}

.alert-success { background: var(--success-light); color: var(--success); border-color: #bbf7d0; }
.alert-danger  { background: var(--danger-light); color: var(--danger); border-color: #fecaca; }
.alert-warning { background: var(--warning-light); color: var(--warning); border-color: #fde68a; }
.alert-info    { background: var(--info-light); color: var(--info); border-color: #a5f3fc; }

/* === Filter Section === */
.filter-section {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: .75rem;
    align-items: end;
}

.filter-actions {
    display: flex;
    gap: .5rem;
    align-items: end;
    padding-top: .25rem;
}

/* === Detail Grid === */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}

.detail-item {
    padding: .5rem 0;
}

.detail-item .label {
    font-size: .75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: .15rem;
}

.detail-item .value {
    font-size: .9rem;
    font-weight: 500;
}

/* === Documentation Gallery === */
.doc-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.doc-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.doc-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.doc-item .doc-meta {
    padding: .5rem;
    font-size: .7rem;
    color: var(--text-light);
}

.doc-item .doc-actions {
    padding: 0 .5rem .5rem;
}

/* === Map === */
#map {
    width: 100%;
    height: calc(100vh - var(--header-h) - 3rem);
    min-height: 400px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

/* === Profile === */
.profile-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border);
}

.profile-photo-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* === Activity Log === */
.activity-list {
    list-style: none;
}

.activity-list li {
    padding: .5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: .8rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .5rem;
}

.activity-list li:last-child {
    border-bottom: none;
}

.activity-time {
    color: var(--text-light);
    font-size: .7rem;
    white-space: nowrap;
}

/* === Modal / Overlay === */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 1.5rem;
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-md);
}

.modal-box h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* === Utility === */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-light); }
.text-small  { font-size: .8rem; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.d-flex { display: flex; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.w-full { width: 100%; }

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: .5rem;
.custom-svg-marker {
    background: none !important;
    border: none !important;
}

/* === Responsive === */
@media (max-width: 768px) {
    html {
        font-size: 13px;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.4);
        z-index: 1199;
    }

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

    .main-content {
        margin-left: 0;
    }

    .hamburger {
        display: block;
    }

    .content {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    table th,
    table td {
        padding: .5rem;
        font-size: .78rem;
    }

    #map {
        height: 60vh;
        min-height: 300px;
    }
}

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

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .btn-group {
        flex-direction: column;
    }

    .doc-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}
