/* ========================================
   Minimal Custom Styles - 仅包含 Tailwind 无法实现的样式
   ======================================== */

/* ========================================
   CSS Variables - 颜色和设计 token
   ======================================== */
:root {
    /* 表面颜色 */
    --color-surface: #ffffff;
    --color-surface-elevated: #ffffff;

    /* 边框颜色 */
    --color-border: #e5e7eb;
    --color-border-light: #f3f4f6;

    /* 文本颜色 */
    --color-text: #111827;
    --color-text-light: #6b7280;
    --color-text-lighter: #9ca3af;

    /* 主色调 */
    --color-primary: #111827;
    --color-primary-hover: #000000;

    /* 状态颜色 */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;

    /* 圆角 */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;

    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ========================================
   Header Styles - 顶部导航 (黑白简约风格)
   ======================================== */
.ds-header {
    position: fixed;
    top: 0;
    left: 0;  /* Default: no sidebar on public pages */
    right: 0;
    z-index: 50;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

/* Header offset when sidebar is present (logged in) */
.ds-header.has-sidebar {
    left: 240px;
}

.ds-header-blur {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
}

.ds-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ds-header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.ds-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ds-header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #111827;
}

.ds-header-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: #111827;
    border-radius: 8px;
    color: white;
}

.ds-header-logo-icon i {
    width: 20px;
    height: 20px;
}

.ds-header-logo-text {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.ds-header-tagline {
    font-size: 0.875rem;
    color: #6b7280;
    padding-left: 1.5rem;
    border-left: 1px solid #e5e7eb;
}

.ds-header-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ds-header-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.ds-header-link:hover {
    color: #111827;
    background-color: #f3f4f6;
}

.ds-header-link-primary {
    background-color: #111827;
    color: white;
}

.ds-header-link-primary:hover {
    background-color: #000000;
    color: white;
}

.ds-header-menu-toggle {
    display: none;
    padding: 0.5rem;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    color: #374151;
}

.ds-header-menu-toggle:hover {
    background-color: #f3f4f6;
    color: #111827;
}

/* Mobile menu */
@media (max-width: 768px) {
    .ds-header-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .ds-header-nav {
        display: none;
    }

    .ds-header-tagline {
        display: none;
    }

    .ds-header-inner {
        padding: 0 1rem;
    }
}

/* ========================================
   Footer Styles - 底部
   ======================================== */
.ds-footer {
    width: 100%;
    min-width: 100%;
    max-width: 100vw;
    flex-shrink: 0;
    background-color: #ffffff;
    border-top: 1px solid #e5e7eb;
    padding: 1.5rem 0;
    margin-top: auto;
    box-sizing: border-box;
}

/* Override for non-sidebar pages - ensure no left margin */
.ds-footer:not(.has-sidebar) {
    margin-left: 0 !important;
}

/* Footer offset when sidebar is present (logged in) */
.ds-footer.has-sidebar {
    margin-left: 240px;
}

.ds-footer-inner {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.ds-footer-text {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.ds-footer-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.ds-footer-link {
    font-size: 0.875rem;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ds-footer-link:hover {
    color: #4f46e5;
}

@media (max-width: 640px) {
    .ds-footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .ds-footer-links {
        gap: 1rem;
    }
}

/* ========================================
   Sidebar Styles - 侧边栏 (黑白简约风格)
   ======================================== */
.ds-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    background-color: #ffffff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    z-index: 40;
    overflow-y: auto;
}

.ds-sidebar-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.ds-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #111827;
}

.ds-sidebar-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: #111827;
    border-radius: 6px;
    color: white;
    flex-shrink: 0;
}

.ds-sidebar-logo-icon i {
    width: 20px;
    height: 20px;
}

.ds-sidebar-logo-text {
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
}

.ds-sidebar-nav {
    flex: 1;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ds-sidebar-section {
    margin-bottom: 1rem;
}

.ds-sidebar-section-title {
    font-size: 0.75rem;
    font-weight: 500;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
}

.ds-sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    color: #4b5563;
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.ds-sidebar-item:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.ds-sidebar-item.active {
    background-color: #111827;
    color: #ffffff;
    font-weight: 500;
}

.ds-sidebar-item i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.ds-sidebar-footer {
    padding: 1rem 0.75rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ds-sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.ds-sidebar-user-avatar {
    width: 32px;
    height: 32px;
    background-color: #111827;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.ds-sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.ds-sidebar-user-name {
    font-size: 0.875rem;
    color: #111827;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ds-sidebar-logout {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    color: #f87171;
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.ds-sidebar-logout:hover {
    background-color: rgba(248, 113, 113, 0.1);
    color: #f87171;
}

.ds-sidebar-logout i {
    width: 20px;
    height: 20px;
}

/* ========================================
   Mobile Navigation Styles - 移动端导航 (黑白简约风格)
   ======================================== */
.ds-mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 60;
    visibility: hidden;
    pointer-events: none;
}

.ds-mobile-nav.open {
    visibility: visible;
    pointer-events: auto;
}

.ds-mobile-nav-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ds-mobile-nav.open .ds-mobile-nav-overlay {
    opacity: 1;
}

.ds-mobile-nav-drawer {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 85vw;
    height: 100%;
    background-color: #ffffff;
    border-left: 1px solid #e5e7eb;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.ds-mobile-nav.open .ds-mobile-nav-drawer {
    transform: translateX(0);
}

.ds-mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.ds-mobile-nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ds-mobile-nav-close:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.ds-mobile-nav-content {
    flex: 1;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ds-mobile-nav-section {
    margin-bottom: 1rem;
}

.ds-mobile-nav-section-title {
    font-size: 0.75rem;
    font-weight: 500;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
}

.ds-mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: #4b5563;
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.ds-mobile-nav-item:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.ds-mobile-nav-item.active {
    background-color: #111827;
    color: #ffffff;
}

.ds-mobile-nav-item i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.ds-mobile-nav-footer {
    padding: 1rem 0.75rem;
    border-top: 1px solid #e5e7eb;
}

/* ========================================
   Breadcrumb Styles - 面包屑导航
   ======================================== */
.ds-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    flex-wrap: wrap;
}

.ds-breadcrumb a {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ds-breadcrumb a:hover {
    color: #4f46e5;
}

.ds-breadcrumb a i {
    width: 16px;
    height: 16px;
}

.ds-breadcrumb span {
    color: #9ca3af;
}

.ds-breadcrumb .current {
    color: #111827;
    font-weight: 500;
}

/* 动画 - Tailwind 配置已在 layouts 中定义 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Toast 通知容器 - 固定在顶部 */
#toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

#toast-container > * {
    pointer-events: auto;
}

/* 加载骨架屏动画 */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@media (prefers-color-scheme: dark) {
    .skeleton {
        background: linear-gradient(90deg, #1f1f1f 25%, #2a2a2a 50%, #1f1f1f 75%);
        background-size: 200% 100%;
    }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 防止闪烁 */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 打印样式 */
@media print {
    .no-print {
        display: none !important;
    }
}

/* ========================================
   Button Styles - 按钮样式 (黑白简约风格)
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.5;
    background-color: #ffffff;
    color: #111827;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background-color: #111827;
    color: white;
    border-color: #111827;
}

.btn-primary:hover:not(:disabled) {
    background-color: #000000;
    border-color: #000000;
    color: white;
}

.btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
    border-color: #e5e7eb;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #e5e7eb;
    border-color: #d1d5db;
}

.btn-danger {
    background-color: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.btn-danger:hover:not(:disabled) {
    background-color: #fee2e2;
    border-color: #fca5a5;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1.0625rem;
}

.btn-outline {
    background-color: transparent;
    color: #111827;
    border-color: #111827;
}

.btn-outline:hover:not(:disabled) {
    background-color: #111827;
    color: white;
}

.w-full {
    width: 100%;
}

/* ========================================
   Form Styles - 表单样式
   ======================================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #111827;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #9ca3af;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.form-help {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-top: 0.375rem;
}

.form-error {
    font-size: 0.8125rem;
    color: #dc2626;
    margin-top: 0.375rem;
}

/* ========================================
   Card Styles - 卡片样式
   ======================================== */
.card {
    background-color: #ffffff;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

/* ========================================
   Table Styles - 表格样式
   ======================================== */
.table-container {
    overflow-x: auto;
}

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

.table th,
.table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.table th {
    font-weight: 600;
    color: #374151;
    background-color: #f9fafb;
}

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

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

/* ========================================
   Badge Styles - 标签样式
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    line-height: 1;
}

.badge-primary {
    background-color: #eef2ff;
    color: #4f46e5;
}

.badge-success {
    background-color: #ecfdf5;
    color: #059669;
}

.badge-warning {
    background-color: #fffbeb;
    color: #d97706;
}

.badge-danger {
    background-color: #fef2f2;
    color: #dc2626;
}

.badge-gray {
    background-color: #f3f4f6;
    color: #6b7280;
}

/* ========================================
   Page Header Styles - 页面头部
   ======================================== */
.page-header {
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.page-description {
    font-size: 0.9375rem;
    color: #6b7280;
    margin: 0;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* ========================================
   Empty State Styles - 空状态
   ======================================== */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background-color: #f3f4f6;
    border-radius: 50%;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.empty-state-icon i {
    width: 28px;
    height: 28px;
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.empty-state-description {
    font-size: 0.9375rem;
    color: #6b7280;
    margin: 0 0 1.5rem 0;
}

/* ========================================
   Loading Spinner - 加载动画
   ======================================== */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    border-top-color: #4f46e5;
    animation: spin 0.8s linear infinite;
}

.spinner-sm {
    width: 16px;
    height: 16px;
}

.spinner-lg {
    width: 32px;
    height: 32px;
    border-width: 3px;
}

/* ========================================
   Modal Styles - 模态框
   ======================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 32rem;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ========================================
   Utility Classes - 工具类
   ======================================== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-600 {
    color: #4b5563;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.w-full { width: 100%; }
.h-full { height: 100%; }

.hidden { display: none; }
.block { display: block; }
.inline-flex { display: inline-flex; }

.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }

.shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========================================
   Responsive Utilities - 响应式工具类
   ======================================== */
@media (max-width: 768px) {
    .md\:hidden {
        display: none !important;
    }

    .md\:grid-cols-2 {
        grid-template-columns: 1fr;
    }

    .md\:flex-col {
        flex-direction: column;
    }

    .page-actions {
        flex-direction: column;
        align-items: stretch;
    }

    /* Hide sidebar on mobile, use main content area */
    .ds-sidebar {
        display: none;
    }

    .pl-6 {
        padding-left: 1rem;
    }

    .pr-6 {
        padding-right: 1rem;
    }
}

@media (min-width: 769px) {
    /* Add sidebar offset for authenticated pages */
    .pl-6 {
        padding-left: 256px;
    }
}

@media (max-width: 640px) {
    .sm\:hidden {
        display: none !important;
    }

    .sm\:grid-cols-1 {
        grid-template-columns: 1fr;
    }

    .sm\:text-center {
        text-align: center;
    }

    .sm\:w-full {
        width: 100%;
    }
}
