:root {
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --brand-blue: #004AAD;
    --brand-blue-hover: #003a88;
    --brand-lime: #99CC33;
    --brand-lime-hover: #86b828;
    --brand-lime-glow: rgba(153, 204, 51, 0.35);
    --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Palette */
[data-theme="dark"] {
    --bg-base: #0a0f1d;
    --bg-card: #111827;
    --bg-card-inner: #162032;
    --bg-card-hover: #1c2940;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.08);
    --header-bg: rgba(10, 15, 29, 0.95);
    --input-bg: #1e293b;
    --input-border: rgba(255, 255, 255, 0.1);
}

/* Light Palette */
[data-theme="light"] {
    --bg-base: #edf2f7;
    --bg-card: #ffffff;
    --bg-card-inner: #f1f5f9;
    --bg-card-hover: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: rgba(0, 74, 173, 0.12);
    --header-bg: rgba(237, 242, 247, 0.95);
    --input-bg: #f8fafc;
    --input-border: rgba(0, 74, 173, 0.18);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* LOGIN CONTAINER */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: radial-gradient(circle at center, rgba(0, 74, 173, 0.15) 0%, transparent 70%);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 25px;
}

.admin-logo {
    height: 36px;
    margin-bottom: 12px;
}

[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: inline-block; }
[data-theme="light"] .logo-dark { display: none; }
[data-theme="light"] .logo-light { display: inline-block; }

.login-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.login-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-main);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
}

.input-with-icon input,
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px 11px 40px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-smooth);
}

.form-group input:not(.input-with-icon input),
.form-group select,
.form-group textarea {
    padding-left: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--brand-lime);
    box-shadow: 0 0 0 3px var(--brand-lime-glow);
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-blue), #003a88);
    color: #fff;
    border: none;
    padding: 11px 20px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056cc, var(--brand-blue));
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 74, 173, 0.4);
}

.btn-block {
    width: 100%;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.back-to-site {
    color: var(--text-muted);
    font-size: 0.82rem;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.back-to-site:hover {
    color: var(--brand-lime);
}

/* ADMIN NAVBAR */
.admin-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 4%;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

.nav-icon {
    height: 28px;
}

.role-badge {
    padding: 4px 10px;
    background: rgba(153, 204, 51, 0.15);
    color: var(--brand-lime);
    border: 1px solid rgba(153, 204, 51, 0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 8px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-smooth);
}

.btn-outline:hover {
    border-color: var(--brand-lime);
    color: var(--brand-lime);
}

.btn-logout {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-smooth);
}

.btn-logout:hover {
    background: #ef4444;
    color: #fff;
}

.theme-toggle-btn {
    background: var(--bg-card-inner);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* TABS BAR */
.admin-tabs-bar {
    display: flex;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 0 4%;
    gap: 10px;
    overflow-x: auto;
}

.tab-btn {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 14px 18px;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: var(--transition-smooth);
}

.tab-btn:hover {
    color: var(--text-main);
}

.tab-btn.active {
    color: var(--brand-lime);
    border-bottom-color: var(--brand-lime);
}

.badge-count {
    padding: 2px 7px;
    background: var(--brand-blue);
    color: #fff;
    border-radius: 12px;
    font-size: 0.72rem;
}

/* DASHBOARD CONTENT */
.dashboard-content {
    max-width: 1240px;
    width: 100%;
    margin: 30px auto;
    padding: 0 20px;
    flex: 1;
}

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

.content-header h1 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.content-header p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* STATS ROW */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 25px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.stat-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
}

.text-warning { color: #f59e0b !important; }
.text-info { color: #38bdf8 !important; }
.text-success { color: #22c55e !important; }

/* DATA TABLES */
.orders-table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.table-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}

.filter-group select {
    padding: 7px 12px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: var(--text-main);
}

.table-search {
    padding: 8px 14px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.85rem;
    min-width: 250px;
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.data-table th {
    padding: 12px 14px;
    background: var(--bg-card-inner);
    color: var(--text-muted);
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
}

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

.status-badge-sm {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-dp_verified { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.status-in_progress { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.status-review { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.status-completed { background: rgba(34, 197, 94, 0.15); color: #22c55e; }

.table-action-btns {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-icon-action {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-card-inner);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.btn-icon-action:hover {
    border-color: var(--brand-lime);
    color: var(--brand-lime);
}

.btn-wa-sm {
    background: rgba(37, 211, 102, 0.15);
    color: #25d366;
    border-color: rgba(37, 211, 102, 0.3);
}

.btn-wa-sm:hover {
    background: #25d366;
    color: #fff;
}

/* TEAM ROLES & TUPOKSI */
.team-roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.role-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.role-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.role-card-header i {
    font-size: 1.6rem;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.super-admin-header i { background: rgba(234, 179, 8, 0.15); color: #eab308; }
.pm-header i { background: rgba(0, 74, 173, 0.2); color: #38bdf8; }
.creative-header i { background: rgba(153, 204, 51, 0.15); color: var(--brand-lime); }
.finance-header i { background: rgba(168, 85, 247, 0.15); color: #c084fc; }

.role-card-header h3 {
    font-size: 1.05rem;
    font-weight: 800;
}

.role-card-header span {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.role-tupoksi strong {
    font-size: 0.8rem;
    color: var(--brand-lime);
    display: block;
    margin-bottom: 8px;
}

.role-tupoksi ul {
    padding-left: 18px;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.role-tupoksi li {
    margin-bottom: 6px;
}

.team-list-section h3 {
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.team-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.team-member-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.member-info h4 { font-size: 0.95rem; margin-bottom: 2px; }
.member-info span { font-size: 0.78rem; color: var(--text-muted); }

/* SEO FORMS */
.seo-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.seo-form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 24px;
}

.seo-form-card h3 {
    font-size: 1.05rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-lime);
}

/* TESTIMONIALS GRID */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.client-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--brand-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
}

.client-name { font-size: 0.92rem; font-weight: 800; }
.client-role { font-size: 0.75rem; color: var(--text-muted); }
.star-rating { color: #f59e0b; font-size: 0.8rem; margin-bottom: 10px; }
.testimonial-content { font-size: 0.85rem; line-height: 1.5; color: var(--text-muted); margin-bottom: 16px; }

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

.card-actions {
    display: flex;
    gap: 8px;
}

.btn-card-action {
    background: var(--bg-card-inner);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-card-action:hover {
    border-color: var(--brand-lime);
    color: var(--brand-lime);
}

.btn-card-delete:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* MODALS */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 35px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-lg {
    max-width: 680px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
}

.modal-header {
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.modal-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

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

.form-checkbox {
    margin-bottom: 18px;
    font-size: 0.85rem;
}

.form-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.file-upload-box {
    padding: 14px;
    background: var(--bg-card-inner);
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    text-align: center;
}

.upload-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.btn-remove-img {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    margin-left: 10px;
}

@media (max-width: 768px) {
    .form-row { grid-template-columns: 1fr; }
    .content-header { flex-direction: column; align-items: flex-start; }
    .admin-navbar { padding: 12px 16px; }
}
