/* ==========================================================================
   RoroScan Web Admin — Design System & Custom Styles
   PT Pelayaran Citra Niaga Mandiri
   Plus Jakarta Sans & Glassmorphism Theme (Slate & Sage Green)
   ========================================================================== */

/* Base & Layout Settings */
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: radial-gradient(circle at top right, #1e293b 0%, #111517 60%, #0e1215 100%);
    color: #cbd5e1;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #0e1215;
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8faf8a;
    box-shadow: 0 0 10px rgba(143, 175, 138, 0.5);
}

/* Glassmorphic Panel Cards */
.glass-card {
    background: rgba(30, 41, 59, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(143, 175, 138, 0.12);
    border-radius: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}
.glass-card:hover {
    border-color: rgba(143, 175, 138, 0.3);
    box-shadow: 0 12px 40px -10px rgba(143, 175, 138, 0.15);
    transform: translateY(-2px);
}

/* Glowing Metrics Stat Cards */
.stat-card {
    position: relative;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.75), rgba(22, 27, 30, 0.7));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(143, 175, 138, 0.15);
    border-radius: 1.25rem;
    padding: 1.75rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.stat-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(143, 175, 138, 0.35), transparent);
}
.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(143, 175, 138, 0.45);
    box-shadow: 0 16px 45px -8px rgba(143, 175, 138, 0.22);
}
.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.05);
}
.stat-card .stat-value {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff, #8faf8a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Floating Sidebar Panel */
.sidebar {
    background: linear-gradient(180deg, #111517 0%, #0e1215 100%);
    border-right: 1px solid rgba(143, 175, 138, 0.1);
    width: 270px;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 40;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar .nav-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.8rem 1.25rem;
    border-radius: 0.75rem;
    margin: 0.25rem 1rem;
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
}
.sidebar .nav-item:hover {
    background: rgba(143, 175, 138, 0.08);
    color: #e2e8f0;
    transform: translateX(4px);
}
.sidebar .nav-item.active {
    background: linear-gradient(135deg, rgba(143, 175, 138, 0.15), rgba(92, 122, 86, 0.08));
    color: #8faf8a;
    border-color: rgba(143, 175, 138, 0.25);
    font-weight: 600;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

/* Main Content Area */
.main-content {
    margin-left: 270px;
    padding: 2rem 2.5rem;
    min-height: 100vh;
}

/* Card-Row Data Table */
.data-table {
    width: 100%;
    border-spacing: 0 0.5rem;
    border-collapse: separate;
}
.data-table thead th {
    padding: 1rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    border: none;
}
.data-table tbody tr {
    background: rgba(30, 41, 59, 0.25);
    transition: all 0.2s ease;
}
.data-table tbody td {
    padding: 1.125rem 1.25rem;
    font-size: 0.875rem;
    color: #cbd5e1;
    border-top: 1px solid rgba(143, 175, 138, 0.08);
    border-bottom: 1px solid rgba(143, 175, 138, 0.08);
}
.data-table tbody td:first-child {
    border-left: 1px solid rgba(143, 175, 138, 0.08);
    border-radius: 0.75rem 0 0 0.75rem;
}
.data-table tbody td:last-child {
    border-right: 1px solid rgba(143, 175, 138, 0.08);
    border-radius: 0 0.75rem 0.75rem 0;
}
.data-table tbody tr:hover td {
    background: rgba(143, 175, 138, 0.08);
    border-color: rgba(143, 175, 138, 0.2);
}

/* Buttons with Gradient & Shadows */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    outline: none;
}
.btn-primary {
    background: linear-gradient(135deg, #8faf8a, #5c7a56);
    color: #111517;
    box-shadow: 0 4px 14px rgba(143, 175, 138, 0.25);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(143, 175, 138, 0.4);
    filter: brightness(1.05);
}
.btn-success {
    background: #4a9b6e;
    color: white;
    box-shadow: 0 4px 14px rgba(74, 155, 176, 0.2);
}
.btn-success:hover {
    background: #3b7c58;
    transform: translateY(-1px);
}
.btn-danger {
    background: #c0574f;
    color: white;
    box-shadow: 0 4px 14px rgba(192, 87, 79, 0.2);
}
.btn-danger:hover {
    background: #a2463e;
    transform: translateY(-1px);
}
.btn-outline {
    background: transparent;
    border: 1px solid rgba(143, 175, 138, 0.35);
    color: #94a3b8;
}
.btn-outline:hover {
    border-color: #8faf8a;
    color: #e2e8f0;
    background: rgba(143, 175, 138, 0.08);
}
.btn-sm {
    padding: 0.4rem 0.875rem;
    font-size: 0.8125rem;
    border-radius: 0.5rem;
}

/* Glassmorphic Form Inputs */
.form-input {
    width: 100%;
    padding: 0.675rem 1.125rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(143, 175, 138, 0.2);
    border-radius: 0.75rem;
    color: #e2e8f0;
    font-size: 0.875rem;
    transition: all 0.25s ease;
    outline: none;
}
.form-input:focus {
    border-color: #8faf8a;
    box-shadow: 0 0 0 3px rgba(143, 175, 138, 0.2);
    background: rgba(30, 41, 59, 0.7);
}
.form-input::placeholder {
    color: #64748b;
}
.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}
select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.75rem;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.badge-active {
    background: rgba(74, 155, 110, 0.15);
    color: #4a9b6e;
    border: 1px solid rgba(74, 155, 110, 0.25);
}
.badge-completed {
    background: rgba(91, 138, 166, 0.15);
    color: #5b8aa6;
    border: 1px solid rgba(91, 138, 166, 0.25);
}
.badge-golongan {
    background: rgba(143, 175, 138, 0.15);
    color: #8faf8a;
    border: 1px solid rgba(143, 175, 138, 0.25);
}

/* Modal Backdrops & Overlays */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(7, 10, 19, 0.8);
    backdrop-filter: blur(8px);
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
}
.modal-backdrop.show {
    display: flex;
}
.modal-content {
    background: linear-gradient(135deg, #1e293b 0%, #111517 100%);
    border: 1px solid rgba(143, 175, 138, 0.25);
    border-radius: 1.5rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Toast Alerts */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.toast {
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    animation: toastSlide 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-width: 300px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.toast-success {
    background: rgba(74, 155, 110, 0.95);
    color: white;
}
.toast-error {
    background: rgba(192, 87, 79, 0.95);
    color: white;
}
@keyframes toastSlide {
    from { opacity: 0; transform: translateX(120%); }
    to { opacity: 1; transform: translateX(0); }
}

/* Pagination Control */
.pagination {
    display: flex;
    gap: 0.375rem;
    align-items: center;
}
.pagination button {
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(143, 175, 138, 0.15);
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
}
.pagination button:hover:not(:disabled) {
    border-color: #8faf8a;
    color: #e2e8f0;
    background: rgba(143, 175, 138, 0.08);
}
.pagination button.active {
    background: linear-gradient(135deg, #8faf8a, #5c7a56);
    color: #111517;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(143, 175, 138, 0.2);
}
.pagination button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Premium Login Overhaul */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1e293b 0%, #111517 70%, #0e1215 100%);
    position: relative;
    overflow: hidden;
}
.login-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 1;
    opacity: 0.25;
    animation: floatBlob 10s ease-in-out infinite alternate;
}
@keyframes floatBlob {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-40px) scale(1.15); }
}
.login-card {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(143, 175, 138, 0.25);
    border-radius: 2rem;
    padding: 3.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    z-index: 10;
}
.login-logo {
    font-size: 2.75rem;
    font-weight: 900;
    text-align: center;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #ffffff 30%, #8faf8a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Responsive Handling */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; padding: 1.5rem 1.5rem; }
}

/* Animated Loading Spinner */
.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(143, 175, 138, 0.15);
    border-top-color: #8faf8a;
    border-radius: 50%;
    animation: spin 0.8s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Charts Containers */
.chart-container {
    position: relative;
    height: 320px;
}
