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

:root {
    --primary: #0e7490;          /* Deep Cyan Blue */
    --primary-light: #06b6d4;    /* Bright Cyan Teal */
    --primary-dark: #155e75;     /* Dark Teal */
    --secondary: #8b5cf6;        /* Soft Purple Lavender */
    --secondary-light: #a78bfa;  /* Light Violet */
    --accent: #2dd4bf;           /* Bright Aqua Mint */
    --accent-purple: #9333ea;    /* Purple Accent */
    --primary-gradient: linear-gradient(135deg, #06b6d4 0%, #8b5cf6 100%);
    --button-gradient: linear-gradient(90deg, #2dd4bf 0%, #06b6d4 35%, #8b5cf6 100%);
    --bg-dark: #f8fafc;          /* Light Slate Background */
    --bg-card: #ffffff;          /* White Card Surface */
    --bg-hover: #f1f5f9;         /* Light Grey Hover */
    --surface: #ffffff;
    --border: #e2e8f0;           /* Soft Grey Border */
    --text-primary: #0f172a;     /* Slate 900 */
    --text-secondary: #475569;   /* Slate 600 */
    --text-muted: #94a3b8;       /* Slate 400 */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;


    --font-sans: 'Inter', 'Noto Sans Thai', sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
    --glass: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(226, 232, 240, 0.8);

    --transition: all 0.2s ease-in-out;
}


/* Reset / Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-light);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: var(--bg-hover);
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Selection */
::selection {
    background-color: var(--primary);
    color: #fff;
}

/* App Layout */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100vw;
}

.sidebar {
    width: 260px;
    background-color: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar.collapsed {
    width: 70px;
}

.main-content {
    margin-left: 260px;
    flex-grow: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.main-content.expanded {
    margin-left: 70px;
}

/* Top Bar */
.top-bar {
    height: 70px;
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 90;
}


.content-body {
    padding: 24px;
    flex-grow: 1;
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

/* Flex Utilities */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.align-center { display: flex; align-items: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.gap-4 { gap: 24px; }
.flex-wrap { flex-wrap: wrap; }

/* Grid layout */
.grid {
    display: grid;
    gap: 20px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Spacing Utilities */
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mt-5 { margin-top: 32px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mb-5 { margin-bottom: 32px; }

.p-1 { padding: 4px; }
.p-2 { padding: 8px; }
.p-3 { padding: 16px; }
.p-4 { padding: 24px; }
.p-5 { padding: 32px; }

/* Width/Height Utilities */
.w-full { width: 100%; }
.h-full { height: 100%; }

/* Visibility Utilities */
.hidden { display: none !important; }
.block { display: block !important; }
.inline-block { display: inline-block !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-muted { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-secondary) !important; }

/* Helper classes */
.cursor-pointer { cursor: pointer; }
.no-select { user-select: none; }

/* Color Utilities */
.text-danger  { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-info    { color: var(--info) !important; }
.text-primary-color { color: var(--primary) !important; }

/* Background Utilities */
.bg-surface  { background-color: var(--surface) !important; }
.bg-hover    { background-color: var(--bg-hover) !important; }

/* Border Utilities */
.border-top    { border-top: 1px solid var(--border) !important; }
.border-bottom { border-bottom: 1px solid var(--border) !important; }
.rounded       { border-radius: var(--radius-sm) !important; }
.rounded-md    { border-radius: var(--radius-md) !important; }
.rounded-full  { border-radius: var(--radius-full) !important; }

/* Overflow */
.overflow-hidden { overflow: hidden !important; }
.overflow-auto   { overflow: auto !important; }

/* Margin X/Y shortcuts */
.mx-auto { margin-left: auto; margin-right: auto; }
.py-1 { padding-top: 4px; padding-bottom: 4px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.px-2 { padding-left: 8px; padding-right: 8px; }
.px-3 { padding-left: 16px; padding-right: 16px; }
.px-4 { padding-left: 24px; padding-right: 24px; }
