/* ============================================
   工单系统 - 设计系统
   ============================================ */

/* ============================================
   CSS 变量 - 设计令牌
   ============================================ */
:root {
    /* 颜色系统 */
    --color-primary: hsl(250, 95%, 65%);
    --color-primary-hover: hsl(250, 95%, 55%);
    --color-primary-light: hsl(250, 95%, 75%);
    --color-secondary: hsl(200, 100%, 60%);
    --color-accent: hsl(340, 82%, 62%);
    --color-success: hsl(145, 70%, 50%);
    --color-warning: hsl(45, 100%, 55%);
    --color-danger: hsl(0, 85%, 60%);

    /* 深色背景 */
    --bg-primary: hsl(240, 15%, 10%);
    --bg-secondary: hsl(240, 12%, 14%);
    --bg-tertiary: hsl(240, 10%, 18%);
    --bg-hover: hsl(240, 10%, 22%);

    /* 玻璃态效果 */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    /* 文本颜色 */
    --text-primary: hsl(0, 0%, 95%);
    --text-secondary: hsl(0, 0%, 70%);
    --text-tertiary: hsl(0, 0%, 50%);

    /* 间距 */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* 圆角 */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(124, 58, 237, 0.5);

    /* 过渡 */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;

    /* 布局 */
    --sidebar-width: 220px;
    --header-height: 70px;
}

/* 浅色主题 */
[data-theme="light"] {
    /* 浅色背景 */
    --bg-primary: hsl(0, 0%, 98%);
    --bg-secondary: hsl(0, 0%, 100%);
    --bg-tertiary: hsl(0, 0%, 96%);
    --bg-hover: hsl(0, 0%, 94%);

    /* 玻璃态效果 */
    --glass-bg: rgba(0, 0, 0, 0.02);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.08);

    /* 文本颜色 */
    --text-primary: hsl(0, 0%, 10%);
    --text-secondary: hsl(0, 0%, 40%);
    --text-tertiary: hsl(0, 0%, 60%);

    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-glow: 0 0 20px rgba(124, 58, 237, 0.3);
}

/* ============================================
   全局重置
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================
   滚动条样式
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--bg-hover);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* ============================================
   主布局
   ============================================ */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   侧边栏
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-header {
    padding: var(--spacing-lg) var(--spacing-md);
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: var(--shadow-glow);
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    padding: var(--spacing-md);
}

.nav-section {
    margin-bottom: var(--spacing-md);
}

.nav-section-title {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: 0.3rem;
    padding: 0 0.4rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.6rem;
    margin-bottom: 0.2rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--color-primary);
    transform: scaleY(0);
    transition: transform var(--transition-normal);
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: translateX(4px);
}

.nav-item.active {
    background: var(--glass-bg);
    color: var(--color-primary-light);
    box-shadow: var(--shadow-sm);
}

.nav-item.active::before {
    transform: scaleY(1);
}

.nav-item-icon {
    font-size: 1rem;
    width: 18px;
    text-align: center;
    line-height: 1;
}

.nav-item-badge {
    margin-left: auto;
    background: var(--color-danger);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* ============================================
   主内容区域
   ============================================ */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.top-header {
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-xl);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
}

.header-left h1 {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.search-bar {
    position: relative;
}

.search-input {
    width: 320px;
    padding: var(--spacing-sm) var(--spacing-md) var(--spacing-sm) 2.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all var(--transition-normal);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.search-icon {
    position: absolute;
    left: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
}

.header-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
}

.icon-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.icon-btn .badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--color-danger);
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 2px solid var(--glass-border);
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

/* ============================================
   内容区域
   ============================================ */
.content-area {
    flex: 1;
    padding: var(--spacing-md) var(--spacing-xl);
    /* Reduced top/bottom padding */
    overflow-y: auto;
}

.content-grid {
    display: grid;
    gap: var(--spacing-md);
    /* Reduced gap */
}

/* ============================================
   卡片组件
   ============================================ */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    /* Reduced padding inside card */
    transition: all var(--transition-normal);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--glass-border);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
    /* Reduced margin bottom */
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.card-title-icon {
    font-size: 1.5rem;
}

.card-actions {
    display: flex;
    gap: var(--spacing-sm);
}

/* ============================================
   按钮组件
   ============================================ */
.btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--text-tertiary);
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* 视图模式切换按钮 */
.view-mode-btn {
    transition: all 0.3s ease-in-out;
}

.view-mode-btn:hover {
    background: var(--bg-hover) !important;
}

.view-mode-btn.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover)) !important;
    color: white !important;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* ============================================
   标签组件
   ============================================ */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.tag-success {
    background: hsla(145, 70%, 50%, 0.15);
    color: var(--color-success);
    border: 1px solid hsla(145, 70%, 50%, 0.3);
}

.tag-warning {
    background: hsla(45, 100%, 55%, 0.15);
    color: var(--color-warning);
    border: 1px solid hsla(45, 100%, 55%, 0.3);
}

.tag-danger {
    background: hsla(0, 85%, 60%, 0.15);
    color: var(--color-danger);
    border: 1px solid hsla(0, 85%, 60%, 0.3);
}

.tag-primary {
    background: hsla(250, 95%, 65%, 0.15);
    color: var(--color-primary-light);
    border: 1px solid hsla(250, 95%, 65%, 0.3);
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 240px;
    }

    .search-input {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .header-right {
        gap: var(--spacing-sm);
    }

    .search-bar {
        display: none;
    }
}

/* ============================================
   动画
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.fade-in {
    animation: fadeIn var(--transition-normal) ease;
}

.slide-in {
    animation: slideIn var(--transition-normal) ease;
}

/* ============================================
   主题切换按钮
   ============================================ */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 1.2rem;
}

.theme-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ============================================
   模态对话框
   ============================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--glass-border);
}

.modal-header h2 {
    font-size: 1.5rem;
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.modal-footer {
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
    padding: var(--spacing-lg);
    border-top: 1px solid var(--glass-border);
}

/* ============================================
   表单样式
   ============================================ */
#createTicketForm {
    padding: var(--spacing-lg);
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input[type="checkbox"],
.form-group input[type="radio"] {
    width: auto;
    height: auto;
    padding: 0;
    margin-right: 0.5rem;
    background: transparent;
    border: none;
    box-shadow: none;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--spacing-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all var(--transition-normal);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

/* ============================================
   图片上传区域
   ============================================ */
.upload-area {
    padding: var(--spacing-md);
    background: var(--bg-tertiary);
    border: 2px dashed var(--glass-border);
    border-radius: var(--radius-md);
    text-align: center;
    transition: all var(--transition-normal);
}

.upload-area:hover {
    border-color: var(--color-primary);
    background: var(--bg-hover);
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.image-preview-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
}

.image-preview-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.image-preview-item .remove-image {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.image-preview-item .remove-image:hover {
    background: var(--color-danger);
    transform: scale(1.1);
}

/* View Toggle Styles (New) */
.view-toggle-btn {
    transition: all 0.3s ease-in-out;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    background: transparent;
}

.view-toggle-btn.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    color: white;
    border-color: transparent;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.view-toggle-btn:hover:not(.active) {
    background: var(--bg-tertiary);
}

/* 状态筛选下拉动画 (New) */
#psStatusDropdown {
    animation: fadeInDropdown 0.2s ease-out;
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 筛选激活高亮 (New) */
.filter-active {
    border-color: #2563eb !important;
    /* blue-600 */
    background-color: #eff6ff !important;
    /* blue-50 */
    color: #1e40af !important;
    /* blue-800 */
    font-weight: 500;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] .filter-active {
    border-color: #3b82f6 !important;
    background-color: rgba(59, 130, 246, 0.2) !important;
    color: #60a5fa !important;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(124, 58, 237, 0.3);
    border-radius: 50%;
    border-top-color: var(--color-primary);
    animation: spin 1s ease-in-out infinite;
    vertical-align: middle;
    margin-right: 8px;
}

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

/* ============================================
   Store Management Card Optimization
   ============================================ */
.store-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    /* Requirement: 8px spacing */
    margin-bottom: 1.5rem;
}

@media (max-width: 1200px) {
    .store-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .store-grid-container {
        grid-template-columns: 1fr;
    }
}

.store-card {
    padding: 12px;
    /* Requirement: reduced padding */
    /* background set via inline style for dynamic gradients */
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-normal);
    height: 100%;
    /* Removed max-height to allow content to flow naturally, or use flex-grow if needed */
    /* max-height: 300px; */
    position: relative;
    display: flex;
    flex-direction: column;
    /* overflow: hidden;  <-- Removed to allow popup to show outside if needed, though z-index handles it inside */
    overflow: visible;
    /* Changed to visible to allow popups to overflow */
}

.store-card:hover {
    border-color: var(--color-primary) !important;
    box-shadow: var(--shadow-lg) !important;
}

.store-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.store-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 2.6em;
}

.store-card-id {
    font-size: 0.9rem;
    color: #1d4ed8;
    /* Blue 700 - 鲜艳的深蓝色 */
    font-weight: 700;
    font-family: monospace;
    margin-top: 4px;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .store-card-id {
    color: #60a5fa;
    /* Blue 400 - 深色模式下的亮蓝色 */
}

.store-card-body {
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    overflow-y: auto;
    padding-right: 4px;
    min-height: 0;
    /* Important for flex child scrolling */
}

.store-card-body::-webkit-scrollbar {
    width: 4px;
}

.store-card-tags {
    margin-bottom: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.store-card-tag {
    padding: 2px 6px;
    font-size: 0.7rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    color: white;
    box-shadow: var(--shadow-sm);
    display: inline-block;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
}

.store-card-remarks {
    position: relative;
    margin-bottom: 6px;
    padding: 0 4px;
    /* Added padding to align with other content if needed */
}

.store-card-remarks-inner {
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    border: 1px dashed var(--glass-border);
    min-height: 1.8em;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Deprecated/Removed Styles (kept clean) */
/* .store-card-progress { ... } */

.store-card-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--glass-border);
    font-size: 0.7rem;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.store-card-meta-item {
    min-width: 0;
    /* Prevent overflow */
}

.store-card-meta-label {
    color: var(--text-tertiary);
    margin-bottom: 1px;
}

.store-card-meta-value {
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.store-card-footer {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: auto;
    flex-shrink: 0;
}

.store-card-btn {
    font-size: 0.75rem !important;
    padding: 4px 8px !important;
}

/* Ensure status tags in card are compact */
.store-card .tag {
    padding: 0.1rem 0.4rem;
    font-size: 0.7rem;
    line-height: 1.2;
}

.store-card-date-input {
    padding: 2px;
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    font-size: 0.7rem;
    width: 95px;
}

/* ============================================
   Delivery Module Styles (New)
   ============================================ */

.delivery-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: var(--bg-secondary);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.delivery-sidebar {
    width: 320px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--glass-border);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.delivery-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-xl);
    background: var(--bg-primary);
    position: relative;
}

/* Delivery Tabs */
.delivery-tabs {
    display: flex;
    gap: var(--spacing-md);
    padding: 0 var(--spacing-md);
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: var(--spacing-md);
}

.delivery-tab-btn {
    padding: var(--spacing-md) var(--spacing-sm);
    border: none;
    background: none;
    color: var(--text-tertiary);
    font-weight: 600;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.delivery-tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.delivery-tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* Delivery List Items */
.delivery-item {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    border-left: 3px solid transparent;
}

.delivery-item:hover {
    background: var(--bg-hover);
}

.delivery-item.active {
    background: var(--bg-tertiary);
    border-left-color: var(--color-primary);
}

.delivery-item-category {
    font-size: 0.75rem;
    color: var(--color-primary);
    margin-bottom: 0.35rem;
    display: inline-block;
    background: var(--glass-bg);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
}

.delivery-item-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.delivery-item-meta {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Detail View Typography */
.delivery-detail-header {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--glass-border);
}

.delivery-detail-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: var(--spacing-sm) 0;
    line-height: 1.3;
}

.delivery-detail-meta {
    display: flex;
    gap: var(--spacing-md);
    color: var(--text-tertiary);
    font-size: 0.9rem;
    align-items: center;
}

.delivery-detail-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.delivery-detail-content h1,
.delivery-detail-content h2,
.delivery-detail-content h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 700;
    color: var(--text-primary);
}

.delivery-detail-content p {
    margin-bottom: 1em;
}

.delivery-detail-content ul,
.delivery-detail-content ol {
    margin-bottom: 1em;
    padding-left: 1.5em;
}

.delivery-detail-content img {
    max-width: 100%;
    border-radius: var(--radius-md);
    margin: 1em 0;
    box-shadow: var(--shadow-md);
}

/* Empty State */
.delivery-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-tertiary);
}

.delivery-empty-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

.delivery-empty-text {
    font-size: 1rem;
}

/* ============================================
   Delivery Notice Module - High Standard UI
   ============================================ */

/* Layout & Containers */
.notice-layout-container {
    display: flex;
    height: calc(100vh - 200px);
    /* Adjust based on header/tabs */
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.notice-sidebar {
    width: 340px;
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border-right: 1px solid var(--glass-border);
    flex-shrink: 0;
    z-index: 2;
}

.notice-main {
    flex: 1;
    background: var(--bg-primary);
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Search Box Area */
.notice-search-area {
    padding: 1.25rem;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
}

.notice-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.notice-search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-tertiary);
    font-size: 0.9rem;
    pointer-events: none;
}

.notice-search-input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.2rem;
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.notice-search-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: none;
}

/* List Items */
.notice-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
}

.notice-list-item {
    padding: 0.75rem 1rem;
    margin-bottom: 0.4rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.notice-list-item:hover {
    background: var(--bg-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.notice-list-item.active {
    background: var(--bg-tertiary);
    border-color: var(--glass-border);
    box-shadow: var(--shadow-sm);
}

.notice-list-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--color-primary);
    border-radius: 4px 0 0 4px;
}

.notice-item-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notice-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.notice-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.notice-badge.draft {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
}

.notice-badge.new {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
}

/* Detail View */
.notice-detail-container {
    padding: 1.5rem 2rem;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.notice-detail-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.notice-detail-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.notice-detail-meta-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.notice-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: var(--shadow-sm);
}

.notice-meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Content Typography */
.notice-content {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.notice-content p {
    margin-bottom: 0.5em;
}

.notice-content h1,
.notice-content h2,
.notice-content h3 {
    color: var(--text-primary);
    font-weight: 700;
    margin-top: 0.8em;
    margin-bottom: 0.3em;
    line-height: 1.2;
}

.notice-content blockquote {
    border-left: 4px solid var(--color-primary);
    background: var(--bg-tertiary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--text-secondary);
}

.notice-content img {
    max-width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    margin: 1.5rem 0;
}

.notice-content a {
    color: var(--color-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.notice-content a:hover {
    border-bottom-color: var(--color-primary);
}

/* Empty State */
.notice-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-tertiary);
    opacity: 0.7;
}

.notice-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: var(--bg-tertiary);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

/* Attachments Grid */
.attachment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    padding: 1.5rem;
}

.attachment-card {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.attachment-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary-light);
}

.attachment-preview {
    height: 140px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    position: relative;
    overflow: hidden;
}

.attachment-preview::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.05) 100%);
}

.attachment-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.attachment-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95rem;
}

.attachment-meta {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
}

.attachment-actions {
    margin-top: auto;
    display: flex;
    gap: 0.5rem;
}

/* Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.3s ease-out forwards;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}