/* ============================================================
   账号包装管理系统 - 主样式表
   抖音风格, 响应式, 移动优先
   ============================================================ */

/* ========== CSS Variables ========== */
:root {
    --color-primary: #1677ff;
    --color-primary-hover: #0958d9;
    --color-primary-light: rgba(22, 119, 255, 0.08);
    --color-secondary: #333;
    --color-bg: #f5f5f5;
    --color-white: #fff;
    --color-success: #52c41a;
    --color-warning: #faad14;
    --color-error: #ff4d4f;
    --color-info: #1890ff;
    --color-text: #333;
    --color-text-secondary: #666;
    --color-text-muted: #999;
    --color-border: #e8e8e8;
    --color-border-light: #f0f0f0;
    --radius: 8px;
    --radius-sm: 4px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 1px 6px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
    --transition: 0.25s ease;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial,
        sans-serif;
    --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
    --header-height: 60px;
    --sidebar-width: 250px;
    --container-max: 1200px;
}

/* ========== CSS Reset / Normalize ========== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
}

article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section {
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-text);
}

p {
    margin-bottom: 1em;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-primary-hover);
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

ul, ol {
    list-style: none;
}

table {
    border-collapse: collapse;
    width: 100%;
}

input, select, textarea, button {
    font-family: inherit;
    font-size: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 16px 0;
}

/* ========== Container & Layout ========== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 16px;
}

.main-content {
    min-height: calc(100vh - var(--header-height) - 100px);
    padding: 24px 0;
}

/* ========== Header ========== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-primary);
    white-space: nowrap;
}

.logo:hover {
    color: var(--color-primary-hover);
}

/* ========== Navigation ========== */
.nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav a {
    display: inline-block;
    padding: 8px 16px;
    color: var(--color-text);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: color var(--transition), background var(--transition);
}

.nav a:hover {
    color: var(--color-primary);
    background: var(--color-primary-light);
}

.nav-toggle {
    display: none;
    font-size: 24px;
    color: var(--color-text);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid var(--color-border);
    line-height: 1;
}

/* ========== Footer ========== */
.footer {
    background: var(--color-secondary);
    color: var(--color-white);
    text-align: center;
    padding: 24px 0;
    margin-top: auto;
}

.footer p {
    margin: 0;
    font-size: 13px;
    opacity: 0.8;
}

/* ========== Hero Section ========== */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, #0958d9 100%);
    color: var(--color-white);
    padding: 72px 0;
    text-align: center;
}

.hero h1 {
    font-size: 36px;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 32px;
    color: var(--color-white);
}

.hero-cta {
    display: inline-block;
}

/* ========== Sections ========== */
.section {
    padding: 48px 0;
}

.section-title {
    font-size: 24px;
    margin-bottom: 24px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--color-primary);
    margin: 12px auto 0;
    border-radius: 2px;
}

.section-more {
    text-align: center;
    margin-top: 24px;
}

/* ========== Page Title ========== */
.page-title {
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-border-light);
}

/* ========== Cards ========== */
.card {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    transition: box-shadow var(--transition), transform var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.card-title {
    padding: 16px 20px;
    font-size: 16px;
    border-bottom: 1px solid var(--color-border-light);
    margin: 0;
}

.card-body {
    padding: 20px;
}

.card-image {
    width: 100%;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    display: block;
    object-fit: cover;
    transition: transform var(--transition);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-text {
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ========== Grid System ========== */
.grid {
    display: grid;
    gap: 16px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ========== Forms ========== */
.form {
    max-width: 100%;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--color-text);
    font-size: 14px;
}

.form-group small {
    color: var(--color-text-muted);
    font-size: 12px;
}

.form-group .required {
    color: var(--color-error);
    margin-left: 2px;
}

.form-control {
    display: block;
    width: 100%;
    padding: 9px 12px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-light);
}

.form-control::placeholder {
    color: var(--color-text-muted);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23999' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

input[type="file"].form-control {
    padding: 7px 12px;
}

.form-error {
    color: var(--color-error);
    font-size: 12px;
    margin-top: 4px;
}

.form-hint {
    display: block;
    color: var(--color-text-muted);
    font-size: 12px;
    margin-top: 4px;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
}

.form-inline {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.form-inline .form-group {
    margin-bottom: 0;
}

.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-container {
    max-width: 460px;
    margin: 0 auto;
    background: var(--color-white);
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-title {
    text-align: center;
    font-size: 22px;
    margin-bottom: 24px;
}

.form-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--color-text-secondary);
}

.form-footer a {
    color: var(--color-primary);
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 20px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    white-space: nowrap;
    user-select: none;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    color: var(--color-white);
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    color: var(--color-white);
}

.btn-secondary {
    color: var(--color-white);
    background: var(--color-secondary);
    border-color: var(--color-secondary);
}

.btn-secondary:hover {
    background: #444;
    border-color: #444;
    color: var(--color-white);
}

.btn-success {
    color: var(--color-white);
    background: var(--color-success);
    border-color: var(--color-success);
}

.btn-success:hover {
    background: #45a716;
    border-color: #45a716;
    color: var(--color-white);
}

.btn-danger {
    color: var(--color-white);
    background: var(--color-error);
    border-color: var(--color-error);
}

.btn-danger:hover {
    background: #e04345;
    border-color: #e04345;
    color: var(--color-white);
}

.btn-warning {
    color: var(--color-white);
    background: var(--color-warning);
    border-color: var(--color-warning);
}

.btn-warning:hover {
    background: #e09c12;
    border-color: #e09c12;
    color: var(--color-white);
}

.btn-outline {
    color: var(--color-text);
    background: var(--color-white);
    border: 1px solid var(--color-border);
}

.btn-outline:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 32px;
    font-size: 16px;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* ========== Tables ========== */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border-light);
}

.table {
    border-collapse: collapse;
    min-width: 600px;
}

.table thead {
    background: #fafafa;
}

.table th {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-align: left;
    white-space: nowrap;
    border-bottom: 2px solid var(--color-border-light);
}

.table td {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--color-border-light);
    vertical-align: middle;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:nth-child(even) {
    background: #fafafa;
}

.table tbody tr:hover {
    background: var(--color-primary-light);
}

.table-actions {
    white-space: nowrap;
    display: flex;
    gap: 6px;
}

.table-header-actions {
    margin-bottom: 16px;
}

.table-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.table-thumb-placeholder {
    width: 60px;
    height: 60px;
    background: #eee;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--color-text-muted);
}

/* ========== Badges ========== */
.badge {
    display: inline-block;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
    line-height: 1.6;
    background: var(--color-border-light);
    color: var(--color-text-secondary);
    white-space: nowrap;
}

.badge-primary {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.badge-success {
    background: #f6ffed;
    color: var(--color-success);
}

.badge-warning {
    background: #fffbe6;
    color: #d48806;
}

.badge-danger {
    background: #fff2f0;
    color: var(--color-error);
}

.badge-info {
    background: #e6f7ff;
    color: var(--color-info);
}

.badge-secondary {
    background: var(--color-border-light);
    color: var(--color-text-secondary);
}

.badge-new {
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-size: 11px;
}

.badge-status {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.badge-priority {
    font-size: 11px;
}

.priority-high {
    background: #fff7e6;
    color: #d46b08;
}

.priority-urgent {
    background: #fff2f0;
    color: var(--color-error);
}

.priority-normal {
    background: var(--color-border-light);
    color: var(--color-text-secondary);
}

.badge-industry {
    background: var(--color-border-light);
    color: var(--color-text);
    font-size: 11px;
}

/* ========== Alerts ========== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
    border: 1px solid transparent;
}

.alert a {
    font-weight: 500;
}

.alert ul {
    list-style: disc;
    padding-left: 20px;
}

.alert ul li {
    margin-bottom: 4px;
}

.alert-success {
    background: #f6ffed;
    border-color: #b7eb8f;
    color: #135200;
}

.alert-error {
    background: #fff2f0;
    border-color: #ffccc7;
    color: #a8071a;
}

.alert-warning {
    background: #fffbe6;
    border-color: #ffe58f;
    color: #874d00;
}

.alert-info {
    background: #e6f7ff;
    border-color: #91d5ff;
    color: #003a8c;
}

/* ========== Pagination ========== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 0;
    flex-wrap: wrap;
}

.pagination .btn {
    min-width: 80px;
}

.pagination-info {
    font-size: 13px;
    color: var(--color-text-secondary);
}

.page-item {
    display: inline-block;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--color-text);
    background: var(--color-white);
    transition: all var(--transition);
}

.page-link:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.page-item.active .page-link {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

/* ========== Search Bar ========== */
.search-bar {
    margin-bottom: 20px;
}

.search-bar .form-inline {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

/* ========== Summary Bar ========== */
.summary-bar {
    display: flex;
    gap: 20px;
    padding: 12px 0;
    font-size: 14px;
    color: var(--color-text-secondary);
    flex-wrap: wrap;
}

.summary-bar strong {
    color: var(--color-text);
}

/* ========== Filter Bar & Tabs ========== */
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 16px;
}

.filter-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--color-border-light);
    padding-bottom: 0;
}

.filter-tab {
    display: inline-block;
    padding: 8px 20px;
    font-size: 14px;
    color: var(--color-text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
    cursor: pointer;
}

.filter-tab:hover {
    color: var(--color-primary);
}

.filter-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    font-weight: 500;
}

/* ========== Stats ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--color-white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.stat-card-label {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.stat-card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-primary);
}

.stat-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-bar-fill {
    height: 8px;
    background: var(--color-primary);
    border-radius: 4px;
    min-width: 2px;
    transition: width 0.4s ease;
}

.stat-bar-text {
    font-size: 12px;
    color: var(--color-text-secondary);
    white-space: nowrap;
}

/* ========== Steps ========== */
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}

.step-item {
    padding: 24px 16px;
}

.step-number {
    width: 48px;
    height: 48px;
    line-height: 48px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 20px;
    font-weight: 700;
    margin: 0 auto 12px;
}

.step-item h4 {
    margin-bottom: 8px;
    font-size: 16px;
}

.step-item p {
    font-size: 13px;
    color: var(--color-text-secondary);
}

/* ========== Timeline ========== */
.status-timeline {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 0;
}

.timeline {
    display: flex;
    align-items: flex-start;
    gap: 0;
    min-width: 800px;
    list-style: none;
    padding: 0;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-border-light);
    z-index: 0;
}

.timeline-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-border);
    border: 2px solid var(--color-white);
    box-shadow: 0 0 0 2px var(--color-border);
    margin-bottom: 6px;
    transition: all var(--transition);
}

.timeline-item.active .timeline-dot {
    background: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary);
}

.timeline-item.done .timeline-dot {
    background: var(--color-success);
    box-shadow: 0 0 0 2px var(--color-success);
}

.timeline-label {
    font-size: 11px;
    color: var(--color-text-muted);
    text-align: center;
    max-width: 70px;
    line-height: 1.4;
    transition: color var(--transition);
}

.timeline-item.active .timeline-label {
    color: var(--color-primary);
    font-weight: 600;
}

.timeline-item.done .timeline-label {
    color: var(--color-success);
}

/* ========== Gallery ========== */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.gallery-item {
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    aspect-ratio: 4 / 3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* ========== Lightbox ========== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.lightbox.show {
    display: flex;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 36px;
    color: var(--color-white);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity var(--transition);
    background: none;
    border: none;
}

.lightbox-close:hover {
    opacity: 1;
}

/* ========== Modal ========== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 900;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    display: none;
}

.modal-content {
    background: var(--color-white);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 520px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 24px;
    color: var(--color-text-muted);
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
    transition: color var(--transition);
}

.modal-close:hover {
    color: var(--color-text);
}

/* ========== Admin Layout ========== */
.admin-body {
    background: var(--color-bg);
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: var(--sidebar-width);
    background: #1e1e2d;
    color: #a2a3b7;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    overflow-y: auto;
    transition: transform var(--transition);
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-logo a {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-white);
    text-decoration: none;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
    display: flex;
    flex-direction: column;
}

.sidebar-nav a {
    display: block;
    padding: 12px 24px;
    color: #a2a3b7;
    font-size: 14px;
    transition: all var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--color-primary);
}

.sidebar-nav a.active {
    color: var(--color-white);
    background: rgba(22, 119, 255, 0.15);
    border-left-color: var(--color-primary);
    font-weight: 500;
}

.sidebar-nav hr {
    border-color: rgba(255, 255, 255, 0.08);
    margin: 12px 24px;
}

/* Admin Main */
.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin var(--transition);
}

.admin-content {
    padding: 24px;
}

/* ========== Packages ========== */
.packages {
    padding: 48px 0;
}

.package-card {
    text-align: center;
    padding: 24px;
    transition: box-shadow var(--transition), transform var(--transition);
    cursor: pointer;
}

.package-card input[type="radio"] {
    display: none;
}

.package-card input[type="radio"]:checked + .package-info {
    border-color: var(--color-primary);
}

.package-name {
    font-size: 18px;
    margin-bottom: 8px;
}

.package-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 16px;
}

.package-includes {
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.8;
    text-align: left;
    padding-left: 0;
    list-style: none;
}

.package-includes li {
    padding: 2px 0;
}

.package-revisions {
    margin-bottom: 16px;
}

.package-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.package-edit-card {
    margin-bottom: 20px;
}

.packages-list {
    margin-bottom: 16px;
}

.package-table {
    margin-top: 24px;
}

/* ========== Cases ========== */
.case-card {
    display: block;
    overflow: hidden;
    color: var(--color-text);
}

.case-card:hover {
    color: var(--color-text);
}

.case-cover {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--color-border-light);
}

.case-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.case-card:hover .case-cover img {
    transform: scale(1.05);
}

.case-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 14px;
}

.case-info {
    padding: 12px 16px;
}

.case-info h4 {
    font-size: 15px;
    margin-bottom: 6px;
}

/* ========== Task Cards ========== */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-card {
    display: block;
    color: var(--color-text);
    margin-bottom: 0;
}

.task-card:hover {
    color: var(--color-text);
}

.task-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.task-card-no {
    font-size: 15px;
    margin: 0;
    flex: 1;
}

.task-card-body {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.task-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.task-card-label {
    font-size: 12px;
    color: var(--color-text-muted);
}

.task-card-value {
    font-size: 14px;
    font-weight: 500;
}

.task-header {
    margin-bottom: 0;
}

.task-header-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.task-header-label {
    font-size: 12px;
    color: var(--color-text-muted);
}

.task-header-value {
    font-size: 14px;
    font-weight: 500;
}

/* ========== Design Cards ========== */
.design-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.design-preview img.design-image {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    cursor: zoom-in;
    transition: max-height var(--transition);
    background: #f5f5f5;
}

.design-preview img.design-image-zoomed {
    max-height: 600px;
    cursor: zoom-out;
}

.design-image-placeholder {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    font-size: 14px;
}

.design-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.design-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.design-type-label {
    font-weight: 500;
    font-size: 14px;
}

.design-version {
    font-size: 13px;
    color: var(--color-text-secondary);
}

.design-note {
    background: #fafafa;
    padding: 12px;
    border-radius: var(--radius-sm);
}

.design-note h5 {
    font-size: 13px;
    margin-bottom: 6px;
}

.design-note p {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin: 0;
}

.design-file-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.design-task-group {
    margin-bottom: 12px;
}

.design-task-group h4 {
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--color-text-secondary);
}

.design-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border-light);
    flex-wrap: wrap;
}

.design-file-item:last-child {
    border-bottom: none;
}

.design-file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.design-file-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.design-type {
    font-size: 13px;
    font-weight: 500;
}

.design-time {
    font-size: 12px;
    color: var(--color-text-muted);
}

/* ========== Feedback ========== */
.feedback-section {
    border-top: 1px solid var(--color-border-light);
    padding-top: 12px;
}

.feedback-section h5,
.feedback-history h5 {
    font-size: 14px;
    margin-bottom: 8px;
}

.feedback-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feedback-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border-light);
}

.feedback-item:last-child {
    border-bottom: none;
}

.feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.feedback-author {
    font-weight: 500;
    font-size: 13px;
}

.feedback-time {
    font-size: 12px;
    color: var(--color-text-muted);
}

.feedback-content {
    font-size: 14px;
    color: var(--color-text);
    margin-bottom: 8px;
}

.feedback-image {
    margin-bottom: 8px;
}

.feedback-thumbnail {
    max-width: 200px;
    max-height: 150px;
    border-radius: var(--radius-sm);
    cursor: zoom-in;
    border: 1px solid var(--color-border);
}

.feedback-reply {
    background: #fafafa;
    padding: 10px;
    border-radius: var(--radius-sm);
    margin-top: 8px;
    font-size: 13px;
}

.feedback-reply-label {
    font-weight: 500;
    color: var(--color-primary);
}

.feedback-reply-content {
    display: block;
    margin-top: 4px;
}

.reply-label {
    font-weight: 500;
    color: var(--color-primary);
}

.reply-time {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-left: 8px;
}

.feedback-reply-form {
    margin-top: 10px;
}

.feedback-date {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.no-feedback {
    font-size: 13px;
    color: var(--color-text-muted);
}

.feedback-history {
    margin-top: 12px;
    padding: 12px;
    background: #fafafa;
    border-radius: var(--radius-sm);
}

/* ========== Messages ========== */
.messages-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-item {
    padding: 0;
    overflow: hidden;
    margin-bottom: 0;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--color-border-light);
}

.message-title {
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.message-time {
    font-size: 12px;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.message-body {
    padding: 12px 20px;
}

.message-content {
    font-size: 14px;
    color: var(--color-text);
    margin: 0;
}

.message-actions {
    padding: 8px 20px 12px;
    border-top: 1px solid var(--color-border-light);
}

.message-unread {
    border-left: 3px solid var(--color-primary);
}

/* ========== Info List ========== */
.info-list {
    margin: 0;
    list-style: none;
}

.info-list.grid {
    display: grid;
    gap: 16px;
}

.info-list dt {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 2px;
}

.info-list dd {
    font-size: 14px;
    color: var(--color-text);
    margin: 0 0 8px;
}

.info-list dd.price {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
}

.info-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border-light);
}

.info-section:first-of-type {
    margin-top: 8px;
}

.info-section h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.info-section p {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.8;
}

/* ========== Quick Actions / Links ========== */
.quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.quick-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-links .btn {
    justify-content: center;
}

/* ========== CTA Section ========== */
.cta-section {
    text-align: center;
    padding: 48px 0;
    background: var(--color-bg);
}

/* ========== Existing Images ========== */
.existing-images h4 {
    margin-bottom: 12px;
    font-size: 14px;
}

.image-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.image-item img {
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}

.current-image {
    margin-top: 8px;
}

.current-image p {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

.current-file {
    margin-top: 6px;
    font-size: 13px;
    color: var(--color-text-muted);
}

.checkbox-label,
.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
}

/* ========== Text Helpers ========== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--color-text-muted);
}

.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ========== Spacing Utilities ========== */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

/* ========== Empty State ========== */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--color-text-muted);
}

.empty-state p {
    font-size: 15px;
    margin-bottom: 16px;
}

/* ========== Recent Orders ========== */
.recent-orders {
    margin-top: 20px;
}

/* ========== Animations ========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.35s ease backwards;
}

.card:nth-child(1) { animation-delay: 0s; }
.card:nth-child(2) { animation-delay: 0.05s; }
.card:nth-child(3) { animation-delay: 0.1s; }
.card:nth-child(4) { animation-delay: 0.15s; }

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(232, 69, 60, 0.3); }
    50%      { box-shadow: 0 0 0 6px rgba(232, 69, 60, 0); }
}

.badge-new {
    animation: pulse 1.5s infinite;
}

/* ========== Mobile Responsive ========== */
@media (max-width: 992px) {
    .hero h1 { font-size: 28px; }
    .hero { padding: 48px 0; }

    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .package-grid { grid-template-columns: 1fr; }

    .section-title { font-size: 20px; }
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .steps {
        grid-template-columns: 1fr 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card-value {
        font-size: 22px;
    }

    .package-grid {
        grid-template-columns: 1fr;
    }

    /* Nav hamburger */
    .nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--color-white);
        flex-direction: column;
        padding: 8px 0;
        box-shadow: var(--shadow);
        z-index: 99;
    }

    .nav.show {
        display: flex;
    }

    .nav a {
        padding: 12px 20px;
        border-radius: 0;
        width: 100%;
    }

    .nav-toggle {
        display: block;
    }

    /* Admin sidebar collapse */
    .admin-sidebar {
        transform: translateX(-100%);
        width: 260px;
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-content {
        padding: 16px;
    }

    /* Mobile sidebar overlay */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 199;
    }

    .sidebar-overlay.show {
        display: block;
    }

    /* Table adjustments */
    .table th,
    .table td {
        padding: 8px 12px;
        font-size: 13px;
    }

    .form-container {
        padding: 24px 16px;
        margin: 0 -16px;
        border-radius: 0;
    }

    .hero h1 {
        font-size: 24px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .section {
        padding: 32px 0;
    }

    .cta-section {
        padding: 32px 0;
    }

    .form-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .filter-tab {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 22px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 12px;
    }

    .stat-card-value {
        font-size: 20px;
    }

    .btn-lg {
        padding: 10px 24px;
        font-size: 14px;
    }

    .summary-bar {
        flex-direction: column;
        gap: 4px;
    }

    .design-file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .design-file-actions {
        margin-left: 0;
    }

    .message-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

/* ========== Print Styles ========== */
@media print {
    .header,
    .footer,
    .nav,
    .nav-toggle,
    .admin-sidebar,
    .sidebar-overlay,
    .btn,
    .form-actions,
    .pagination,
    .search-bar,
    .filter-tabs,
    .sidebar-nav hr,
    .hero {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
        font-size: 12px;
    }

    .admin-main {
        margin-left: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }

    .table-wrapper {
        border: 1px solid #ddd;
    }

    .table th,
    .table td {
        border-color: #ddd;
    }

    a {
        color: #000;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .main-content {
        padding: 0;
    }
}
