/**
 * Toko Dashboard - Monochrome Clean Style
 * Author: Muhammad Yusuf Abdul Kamal
 */

:root {
    --background: #ffffff;
    --foreground: #0a0a0a;
    --card: #ffffff;
    --card-foreground: #0a0a0a;
    --muted: #f4f4f5;
    --muted-foreground: #71717a;
    --border: #e4e4e7;
    --input: #e4e4e7;
    --ring: #18181b;
    --radius: 0.5rem;
    --sidebar-width: 240px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background-color: var(--muted);
    color: var(--foreground);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--background);
    border-right: 1px solid var(--border);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.sidebar-nav {
    padding: 0.5rem;
}

.sidebar-nav .nav-link {
    color: var(--muted-foreground);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    margin-bottom: 2px;
    transition: all 0.15s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-nav .nav-link:hover {
    background: var(--muted);
    color: var(--foreground);
}

.sidebar-nav .nav-link.active {
    background: var(--foreground);
    color: var(--background);
}

.sidebar-nav hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0.75rem 0;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-header {
    background: var(--background);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-header h4 {
    font-size: 1rem;
    font-weight: 600;
}

.main-header small {
    font-size: 12px;
    color: var(--muted-foreground);
}

.content-wrapper {
    flex: 1;
    padding: 1.5rem;
}

.main-footer {
    background: var(--background);
    padding: 0.75rem 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted-foreground);
}

/* Cards */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: none;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-header h5 {
    font-size: 14px;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

/* Stat Cards */
.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
}

.stat-card .card-body {
    padding: 1.25rem;
}

.stat-card .stat-label {
    font-size: 12px;
    color: var(--muted-foreground);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--foreground);
    margin-top: 0.25rem;
}

.stat-card .stat-icon {
    color: var(--muted-foreground);
    font-size: 1.5rem;
}

/* Tables */
.table {
    margin: 0;
    font-size: 13px;
}

.table th {
    background: var(--muted);
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: var(--muted-foreground);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table tbody tr:hover {
    background: var(--muted);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge {
    font-weight: 500;
    font-size: 11px;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
}

.badge-status-paid {
    background: #dcfce7;
    color: #166534;
}

.badge-status-pending {
    background: #fef9c3;
    color: #854d0e;
}

.badge-status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.badge-channel {
    background: var(--muted);
    color: var(--muted-foreground);
}

.badge-new {
    background: var(--foreground);
    color: var(--background);
}

/* Buttons */
.btn {
    font-size: 13px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: all 0.15s ease;
}

.btn-primary {
    background: var(--foreground);
    border-color: var(--foreground);
    color: var(--background);
}

.btn-primary:hover {
    background: #27272a;
    border-color: #27272a;
}

.btn-outline-primary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--foreground);
}

.btn-outline-primary:hover {
    background: var(--muted);
    border-color: var(--border);
    color: var(--foreground);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 12px;
}

.btn-ghost {
    background: transparent;
    border: none;
    color: var(--muted-foreground);
}

.btn-ghost:hover {
    background: var(--muted);
    color: var(--foreground);
}

/* Form Controls */
.form-select, .form-control {
    font-size: 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
}

.form-select:focus, .form-control:focus {
    border-color: var(--ring);
    box-shadow: 0 0 0 2px rgba(24, 24, 27, 0.1);
}

/* List Group */
.list-group-item {
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 0.875rem 1.25rem;
    font-size: 13px;
}

.list-group-item:last-child {
    border-bottom: none;
}

/* Dropdown */
.dropdown-menu {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 0.25rem;
    font-size: 13px;
}

.dropdown-item {
    border-radius: calc(var(--radius) - 2px);
    padding: 0.5rem 0.75rem;
}

.dropdown-item:hover {
    background: var(--muted);
}

/* Code */
code {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 12px;
    background: var(--muted);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    color: var(--foreground);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        z-index: 1000;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
}
