/* public/assets/css/index.css */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --primary: #111111;
    --gold: #C8A96B;
    --gold-secondary: #A88645;
    --bg: #F8F7F4;
    --white: #FFFFFF;
    --surface-dark: #171717;
    --text-primary: #171717;
    --text-secondary: #737373;
    --border: #E6E1D8;
    
    --success: #2F7D5C;
    --warning: #B7791F;
    --danger: #B84A4A;
    --info: #4267A9;

    --font-sans: 'Inter', sans-serif;
    --font-serif: 'Cormorant Garamond', serif;
    
    --sidebar-width: 260px;
    --header-height: 70px;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--surface-dark);
    color: var(--white);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    overflow-y: auto;
    padding-bottom: 2rem;
    z-index: 100;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.4);
    padding: 1.5rem 1.5rem 0.5rem;
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    position: relative;
}

.nav-item:hover, .nav-item.active {
    color: var(--white);
    background-color: rgba(255,255,255,0.05);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--gold);
}

.nav-icon {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    opacity: 0.7;
}

.nav-item.active .nav-icon {
    color: var(--gold);
    opacity: 1;
}

/* Main Content */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.global-search {
    position: relative;
    width: 300px;
}

.global-search input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
    background-color: var(--bg);
    outline: none;
    transition: border 0.2s;
}

.global-search input:focus {
    border-color: var(--gold);
}

.global-search svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    width: 16px;
    height: 16px;
}

.shopify-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(47, 125, 92, 0.1);
    color: var(--success);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}

/* Page Content */
.page-content {
    padding: 2rem;
    flex: 1;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.page-title {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 600;
    color: var(--primary);
}

/* Cards & Widgets */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.stat-title {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 28px;
    font-weight: 600;
    color: var(--primary);
}

/* Typography Helpers */
.h-serif {
    font-family: var(--font-serif);
}

/* Tables */
.table-container {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1rem 1.5rem;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    background: #FAFAFA;
}

td {
    padding: 1rem 1.5rem;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
    color: var(--primary);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background-color: var(--bg);
}

/* Badges */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge.success { background: rgba(47, 125, 92, 0.1); color: var(--success); }
.badge.warning { background: rgba(183, 121, 31, 0.1); color: var(--warning); }
.badge.danger { background: rgba(184, 74, 74, 0.1); color: var(--danger); }
.badge.info { background: rgba(66, 103, 169, 0.1); color: var(--info); }

/* Side Drawer (Order Details) */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.3);
    z-index: 900;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drawer-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.drawer {
    position: fixed;
    top: 0;
    right: -500px;
    width: 450px;
    height: 100vh;
    background: var(--white);
    z-index: 1000;
    box-shadow: -4px 0 15px rgba(0,0,0,0.05);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.drawer.active {
    right: 0;
}

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

.drawer-title {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 600;
}

.drawer-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
}

.drawer-body {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
}

.drawer-section {
    margin-bottom: 2rem;
}

.drawer-section-title {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.drawer-data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.data-item-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.data-item-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
}
