/**
 * Stylesheet Resmi — Portal PPID SMAN 1 Subang
 * Subdomain Standalone Theme
 */

:root {
    --primary: #0b3a82;
    --primary-dark: #072554;
    --primary-light: #1e56a0;
    --accent: #f5b301;
    --accent-hover: #e0a300;
    --info: #0284c7;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --bg-page: #f8fafc;
    --bg-surface: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover {
    color: var(--primary-light);
}

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

.icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    vertical-align: middle;
    display: inline-block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* ==========================================================================
   TOPBAR & HEADER
   ========================================================================== */
.ppid-topbar {
    background: #061e42;
    color: #94a3b8;
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.ppid-topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.topbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}
.topbar-mainlink {
    color: var(--accent);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s ease;
}
.topbar-mainlink:hover {
    color: #ffd24d;
    transform: translateX(-2px);
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.topbar-right a, .topbar-right span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #cbd5e1;
}
.topbar-right a:hover {
    color: #fff;
}
.topbar-email {
    color: #e2e8f0;
}
.topbar-email:hover {
    color: var(--accent);
}

.ppid-header {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}
.ppid-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 76px;
}
.brand-ppid {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--primary-dark);
}
.brand-badge {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(11, 58, 130, 0.3);
}
.brand-badge .icon {
    width: 24px;
    height: 24px;
}
.brand-logo-img {
    max-height: 48px;
    max-width: 160px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
.brand-titles strong {
    font-size: 17px;
    display: block;
    line-height: 1.2;
    color: var(--primary-dark);
    font-weight: 800;
    letter-spacing: -0.3px;
}
.brand-titles small {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.ppid-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-link {
    padding: 8px 14px;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}
.nav-link:hover {
    color: var(--primary);
    background: #f1f5f9;
}
.nav-link.active {
    color: var(--primary);
    background: #e0e7ff;
}
.nav-btn {
    margin-left: 8px;
    padding: 8px 16px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.nav-btn:hover {
    background: var(--primary-dark);
    color: #fff;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: var(--text-main);
}

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-align: center;
    line-height: 1.4;
    transition: all 0.2s ease;
}
.btn-primary {
    background: var(--primary);
    color: #ffffff;
}
.btn-primary:hover {
    background: var(--primary-dark);
    color: #ffffff;
}
.btn-accent {
    background: var(--accent);
    color: #082859;
}
.btn-accent:hover {
    background: var(--accent-hover);
    color: #082859;
}
.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-main);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f8fafc;
}
.btn-outline-light {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}
.btn-outline-light:hover {
    background: #ffffff;
    color: var(--primary);
}
.btn-danger {
    background: var(--danger);
    color: #fff;
}
.btn-danger:hover {
    background: #b91c1c;
    color: #fff;
}
.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}
.btn-lg {
    padding: 12px 24px;
    font-size: 15px;
}
.btn-block {
    width: 100%;
}
.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    line-height: 1;
}
.chip-accent {
    background: #fef3c7;
    color: #92400e;
}
.chip-primary {
    background: #dbeafe;
    color: #1e40af;
}
.chip-success {
    background: #dcfce7;
    color: #15803d;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.status-pending { background: #fef3c7; color: #b45309; }
.status-info { background: #e0f2fe; color: #0369a1; }
.status-primary { background: #e0e7ff; color: #3730a3; }
.status-accepted { background: #dcfce7; color: #15803d; }
.status-rejected { background: #fee2e2; color: #b91c1c; }

/* ==========================================================================
   CARDS & PANELS
   ========================================================================== */
.card, .panel {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}
.card-body, .panel-body {
    padding: 24px;
}
.card-header, .panel-head {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================================================
   HERO & BANNERS
   ========================================================================== */
.page-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: #ffffff;
    padding: 45px 0 55px;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.6;
}
.page-hero .container {
    position: relative;
    z-index: 2;
}
.page-hero-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}
.page-hero-sub {
    font-size: 16px;
    color: #cbd5e1;
    max-width: 780px;
    line-height: 1.6;
}
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 14px;
}
.breadcrumbs a {
    color: #cbd5e1;
}
.breadcrumbs a:hover {
    color: #ffffff;
}

.ppid-hero-banner {
    background: linear-gradient(135deg, #092347 0%, #0d3b75 100%);
    border-radius: var(--radius-lg);
    padding: 40px;
    color: #fff;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: center;
    box-shadow: var(--shadow-md);
}
.ppid-hero-content h2 {
    font-size: 28px;
    font-weight: 800;
    margin: 8px 0 14px;
    line-height: 1.3;
}
.ppid-hero-content p {
    color: #cbd5e1;
    font-size: 15px;
}
.ppid-hero-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ppid-stat-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 18px 24px;
    border-radius: var(--radius-md);
    transition: transform 0.2s ease;
}
.ppid-stat-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
}
.ppid-stat-card small {
    display: block;
    color: #94a3b8;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
}
.ppid-stat-card strong {
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    display: block;
    margin: 4px 0;
}
.ppid-stat-card span {
    font-size: 12px;
    color: var(--accent);
}

/* ==========================================================================
   SECTIONS & GRIDS
   ========================================================================== */
.section {
    padding: 50px 0;
}
.section-tag {
    display: inline-block;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}
.section-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: -0.5px;
    line-height: 1.3;
}
.section-sub {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.feature-box {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}
.feature-box:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
    transform: translateY(-3px);
}
.feature-icon {
    width: 48px;
    height: 48px;
    background: #eff6ff;
    color: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.feature-icon .icon {
    width: 24px;
    height: 24px;
}
.feature-box h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary-dark);
}
.feature-box p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

/* ==========================================================================
   TABLES & LISTS
   ========================================================================== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}
table.table-custom, table.table-crud {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}
table.table-custom th, table.table-crud th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    padding: 12px 16px;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}
table.table-custom td, table.table-crud td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
table.table-custom tr:hover, table.table-crud tr:hover {
    background-color: #f8fafc;
}

/* ==========================================================================
   FORMS
   ========================================================================== */
.form-group {
    margin-bottom: 20px;
}
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}
.form-label .required {
    color: var(--danger);
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-main);
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(11, 58, 130, 0.15);
}
textarea.form-control {
    min-height: 100px;
    resize: vertical;
}
.form-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}
.field-error {
    display: block;
    color: var(--danger);
    font-size: 12px;
    margin-top: 4px;
    font-weight: 600;
}

.search-input {
    position: relative;
    display: flex;
    align-items: center;
}
.search-input .icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
}
.search-input input {
    padding-left: 42px;
}

/* ==========================================================================
   STEPPER TRACKING TIMELINE
   ========================================================================== */
.ppid-tracker {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 35px 0;
}
.ppid-tracker::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 30px;
    right: 30px;
    height: 4px;
    background: #e2e8f0;
    z-index: 1;
}
.step-item {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}
.step-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #cbd5e1;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: 700;
    transition: all 0.3s ease;
}
.step-title {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
}
.step-sub {
    font-size: 11px;
    color: #94a3b8;
}
.step-item.active .step-circle {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(11, 58, 130, 0.2);
}
.step-item.active .step-title {
    color: var(--primary-dark);
}
.step-item.completed .step-circle {
    border-color: var(--success);
    background: var(--success);
    color: #fff;
}
.step-item.completed .step-title {
    color: var(--success);
}
.step-item.rejected .step-circle {
    border-color: var(--danger);
    background: var(--danger);
    color: #fff;
}

/* ==========================================================================
   ALERTS / FLASH MESSAGES
   ========================================================================== */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.alert-success {
    background: #dcfce7;
    color: #14532d;
    border: 1px solid #bbf7d0;
}
.alert-error {
    background: #fee2e2;
    color: #7f1d1d;
    border: 1px solid #fecaca;
}
.alert-info {
    background: #e0f2fe;
    color: #0c4a6e;
    border: 1px solid #bae6fd;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 30px;
}
.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}
.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.pagination a.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.ppid-footer {
    background: #061e42;
    color: #94a3b8;
    padding: 60px 0 25px;
    margin-top: 60px;
    border-top: 4px solid var(--accent);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-brand strong {
    color: #fff;
    font-size: 18px;
    display: block;
    margin-bottom: 8px;
}
.footer-col h4 {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.footer-links {
    list-style: none;
}
.footer-links li {
    margin-bottom: 8px;
}
.footer-links a {
    color: #cbd5e1;
    font-size: 14px;
}
.footer-links a:hover {
    color: var(--accent);
}
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    color: #64748b;
}

/* ==========================================================================
   ADMIN LAYOUT
   ========================================================================== */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}
.admin-sidebar {
    width: 260px;
    background: #082859;
    color: #fff;
    display: flex;
    flex-direction: column;
}
.sidebar-brand {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}
.sidebar-menu {
    list-style: none;
    padding: 20px 14px;
    flex: 1;
}
.sidebar-menu li {
    margin-bottom: 4px;
}
.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
}
.sidebar-menu a:hover, .sidebar-menu a.active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}
.sidebar-footer {
    padding: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    color: #94a3b8;
}

.admin-main {
    flex: 1;
    background: #f1f5f9;
    display: flex;
    flex-direction: column;
}
.admin-topbar {
    background: #fff;
    padding: 16px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}
.admin-content {
    padding: 28px;
    flex: 1;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 992px) {
    .ppid-hero-banner {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .grid-3, .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}
@media (max-width: 768px) {
    .ppid-nav {
        display: none;
    }
    .nav-toggle {
        display: block;
    }
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    .ppid-tracker {
        flex-direction: column;
        gap: 20px;
    }
    .ppid-tracker::before {
        display: none;
    }
    .admin-wrapper {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
    }
}
