/*
 * Admin Dashboard Stylesheet - PT Samudera Utama Stil CMS
 */

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

:root {
    --admin-navy: #0F172A;
    --admin-slate: #1E293B;
    --admin-yellow: #FFB800;
    --admin-yellow-hover: #E0A200;
    --admin-bg: #F8FAFC;
    --admin-card-bg: #FFFFFF;
    --admin-border: #E2E8F0;
    --admin-text: #0F172A;
    --admin-muted: #64748B;
    --radius: 10px;
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--admin-bg);
    color: var(--admin-text);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background-color: var(--admin-navy);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

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

.sidebar-logo-img {
    max-height: 40px;
    max-width: 48px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    padding: 3px;
    flex-shrink: 0;
}

.sidebar-brand {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    word-break: break-word;
}

.sidebar-brand span {
    color: var(--admin-yellow);
}

.sidebar-menu {
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex-grow: 1;
    overflow-y: auto;
}

.menu-category {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--admin-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.75rem 0.75rem 0.25rem;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.menu-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    color: rgba(255,255,255,0.6);
}

.menu-item:hover, .menu-item.active {
    background-color: rgba(255, 184, 0, 0.15);
    color: var(--admin-yellow);
}

.menu-item:hover i, .menu-item.active i {
    color: var(--admin-yellow);
}

/* Main Content Area */
.admin-wrapper {
    margin-left: 260px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-header {
    background-color: var(--admin-card-bg);
    height: 70px;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--admin-border);
    position: sticky;
    top: 0;
    z-index: 90;
}

.admin-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
}

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

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--admin-yellow);
    color: var(--admin-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.user-info {
    font-size: 0.875rem;
}

.user-info .name {
    font-weight: 600;
}

.user-info .role {
    color: var(--admin-muted);
    font-size: 0.75rem;
}

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

/* Executive Dashboard Company Banner */
.dashboard-banner {
    background: radial-gradient(circle at 85% 20%, rgba(255, 184, 0, 0.12) 0%, transparent 45%), linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 4px solid var(--admin-yellow);
    border-radius: 16px;
    padding: 1.75rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
}

.dashboard-banner::after {
    content: '\f21a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: -20px;
    bottom: -35px;
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.03);
    pointer-events: none;
    line-height: 1;
}

.dashboard-banner-left {
    display: flex;
    align-items: center;
    gap: 1.35rem;
    position: relative;
    z-index: 1;
}

.dashboard-banner-logo-wrapper {
    width: 76px;
    height: 76px;
    background: #FFFFFF;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    flex-shrink: 0;
    border: 2px solid rgba(255, 184, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-banner-logo-wrapper:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 22px rgba(255, 184, 0, 0.2);
}

.dashboard-banner-logo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.dashboard-banner-logo-fallback {
    color: var(--admin-navy);
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-banner-text {
    flex: 1;
}

.dashboard-banner-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}

.badge-status-dot {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-status-dot .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #22c55e;
    box-shadow: 0 0 8px #22c55e;
    display: inline-block;
}

.badge-date {
    color: #94a3b8;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.dashboard-banner-company {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.25;
    margin: 0 0 0.35rem 0;
    letter-spacing: -0.01em;
}

.dashboard-banner-subtitle {
    color: #cbd5e1;
    font-size: 0.88rem;
    line-height: 1.45;
    margin: 0;
}

.dashboard-banner-subtitle strong {
    color: var(--admin-yellow);
    font-weight: 600;
}

.dashboard-banner-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.dashboard-btn-edit {
    background: var(--admin-yellow);
    color: var(--admin-navy);
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0.7rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(255, 184, 0, 0.3);
}

.dashboard-btn-edit:hover {
    background: var(--admin-yellow-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 184, 0, 0.4);
}

.dashboard-btn-site {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.7rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.16);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
}

.dashboard-btn-site:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    transform: translateY(-2px);
}

@media (max-width: 992px) {
    .dashboard-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
    }
    .dashboard-banner-right {
        width: 100%;
        margin-top: 0.5rem;
    }
    .dashboard-btn-edit, .dashboard-btn-site {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .dashboard-banner-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .dashboard-banner-company {
        font-size: 1.35rem;
    }
    .dashboard-banner-right {
        flex-direction: column;
        width: 100%;
    }
    .dashboard-btn-edit, .dashboard-btn-site {
        width: 100%;
    }
}

/* Dashboard Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--admin-card-bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    border: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-info h4 {
    font-size: 0.85rem;
    color: var(--admin-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
}

.stat-info .value {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--admin-navy);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background-color: rgba(255, 184, 0, 0.15);
    color: var(--admin-yellow-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Admin Cards & Data Tables */
.card {
    background-color: var(--admin-card-bg);
    border-radius: var(--radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    border: 1px solid var(--admin-border);
    margin-bottom: 2rem;
}

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

.card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
}

.card-body {
    padding: 1.5rem;
}

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

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

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

.table th {
    background-color: var(--admin-bg);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--admin-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

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

.table-img {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 6px;
}

.badge {
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.badge-success { background-color: #dcfce7; color: #166534; }
.badge-warning { background-color: #fef9c3; color: #854d0e; }
.badge-danger { background-color: #fee2e2; color: #991b1b; }
.badge-info { background-color: #e0f2fe; color: #075985; }

/* Admin Form Controls */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.form-grid-full {
    grid-column: span 2;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    font-family: inherit;
    font-size: 0.9rem;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    background-color: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--admin-yellow);
    box-shadow: 0 0 0 3px rgba(255, 184, 0, 0.2);
}

.img-preview {
    max-width: 200px;
    max-height: 140px;
    object-fit: cover;
    border-radius: 8px;
    margin-top: 0.5rem;
    border: 1px solid var(--admin-border);
}

/* Action Buttons */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #fff;
    transition: all 0.2s ease;
}

.btn-edit { background-color: #3b82f6; }
.btn-edit:hover { background-color: #1d4ed8; }
.btn-delete { background-color: #ef4444; }
.btn-delete:hover { background-color: #b91c1c; }
.btn-view { background-color: #10b981; }
.btn-view:hover { background-color: #047857; }

/* Login Page Styling */
.login-body {
    background-color: var(--admin-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
    background-image: radial-gradient(circle at 50% 15%, rgba(245, 158, 11, 0.1) 0%, transparent 60%);
}

.login-card {
    background-color: #fff;
    width: 100%;
    max-width: 440px;
    padding: 2.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
    border-top: 5px solid var(--admin-yellow);
    position: relative;
}

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

.login-logo-img-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.85rem;
}

.login-logo-img {
    max-height: 75px;
    max-width: 220px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.08));
    transition: transform 0.3s ease;
}

.login-logo-img:hover {
    transform: scale(1.04);
}

.login-logo-badge {
    width: 68px;
    height: 68px;
    margin: 0 auto 0.85rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.06), rgba(245, 158, 11, 0.16));
    border: 2px solid var(--admin-yellow);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--admin-navy);
    font-size: 1.85rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease;
}

.login-logo-badge:hover {
    transform: rotate(6deg) scale(1.05);
}

.login-company-title {
    font-family: 'Outfit', sans-serif;
    color: var(--admin-navy);
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 0.35rem 0;
    word-break: break-word;
}

.login-subtitle {
    color: var(--admin-muted);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
}

.login-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--admin-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.login-back-link:hover {
    color: var(--admin-yellow-hover);
}

.admin-footer {
    padding: 1.5rem 2rem;
    text-align: center;
    color: var(--admin-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--admin-border);
    background-color: var(--admin-card-bg);
}
