:root {
    /* Colors - NK Brand: Black #000000, Red #e60212, Dark Red #9a3837 */
    --header-bg-start: #1a1a1a;
    --header-bg-end: #2d2d2d;
    --primary-color: #d03c32;
    --primary-gradient-start: #e60212;
    --primary-gradient-end: #9a3837;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --bg-color: #f5f7fa;
    --text-primary: #333;
    --text-secondary: #666;
    --text-light: #999;
    --border-color: #e0e0e0;
    --white: #ffffff;

    /* Shadows */
    --card-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05);
    --card-shadow-hover: 0 4px 6px rgba(0,0,0,0.08), 0 12px 24px rgba(0,0,0,0.08);
    --input-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
    
    /* Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Transitions */
    --transition-base: all 0.2s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, "Hiragino Sans", "Noto Sans JP", sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Layout */
.container {
    display: flex;
    min-height: calc(100vh - 60px);
}

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

/* Header */
.header {
    background: linear-gradient(135deg, var(--header-bg-start) 0%, var(--header-bg-end) 100%);
    color: var(--white);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 20px;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    font-size: 14px;
    opacity: 0.9;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: var(--white);
    border-right: 1px solid var(--border-color);
    padding: 24px 0;
    display: flex;
    flex-direction: column;
}

.sidebar-section {
    margin-bottom: 24px;
}

.sidebar-title {
    padding: 0 24px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li a {
    display: block;
    padding: 10px 24px;
    color: var(--text-secondary);
    font-size: 14px;
    transition: var(--transition-base);
    border-left: 3px solid transparent;
}

.sidebar-menu li a:hover {
    background: #f8f9fa;
    color: var(--text-primary);
    padding-left: 28px; /* Subtle movement */
}

.sidebar-menu li a.active {
    background: #e8f0fe;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 500;
}

/* Cards */
.card, .stat-card, .login-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    transition: var(--transition-base);
    border: 1px solid rgba(0,0,0,0.02); /* Very subtle border */
}

.card:hover, .stat-card:hover {
    box-shadow: var(--card-shadow-hover);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-header a {
    font-size: 13px;
    color: var(--primary-color);
    font-weight: 500;
}

.card-body {
    padding: 24px;
}

/* Buttons */
.btn-primary, .btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-gradient-start) 0%, var(--primary-gradient-end) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: 0 2px 4px rgba(74, 144, 217, 0.2);
}

.btn-primary:hover, .btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(74, 144, 217, 0.3);
}

.btn-primary:active, .btn-login:active {
    transform: translateY(0);
}

.btn-logout {
    padding: 8px 16px;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition-base);
}

.btn-logout:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: var(--transition-base);
    background: #fff;
    box-shadow: var(--input-shadow);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.1);
}

/* Tables */
.table-container, .products-table {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

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

th {
    background: #f8f9fa;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 13px;
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

td {
    padding: 16px;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    color: var(--text-primary);
    vertical-align: middle;
}

tr {
    transition: background-color 0.15s ease;
}

tr:hover {
    background-color: #f8f9fa;
}

/* Badges */
.status-badge, .category-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
}

.status-active, .status-done { background: #e6f9ed; color: #1e7e34; }
.status-inactive, .status-danger { background: #fdecea; color: #c62828; }
.status-draft, .status-waiting { background: #fff8e1; color: #f57f17; }
.category-badge { background: #e8f0fe; color: var(--primary-color); }

/* Utility */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-title {
    font-size: 24px;
    color: var(--text-primary);
    font-weight: 700;
}

.filters {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.loading, .empty-state {
    text-align: center;
    padding: 48px;
    color: var(--text-secondary);
}

/* Specific to Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.stat-card h3 {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.stat-card .value {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-card .subtitle {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 8px;
}

/* Action Buttons in Table */
.btn-edit, .btn-delete, .btn-view {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    border: none;
    transition: var(--transition-base);
    font-weight: 500;
}

.btn-edit { background: #e8f0fe; color: var(--primary-color); }
.btn-edit:hover { background: #d2e3fc; }

.btn-delete { background: #fdecea; color: var(--danger-color); }
.btn-delete:hover { background: #fadbd8; }

.btn-view { background: #f8f9fa; color: var(--text-secondary); border: 1px solid #ddd; }
.btn-view:hover { background: #e9ecef; }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 24px 0;
}

.pagination button {
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-base);
    color: var(--text-secondary);
}

.pagination button:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #d0d0d0;
}

.pagination button.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Task Status Dots */
.task-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.task-status.waiting { background: var(--warning-color); }
.task-status.progress { background: var(--primary-color); }
.task-status.done { background: var(--success-color); }

.task-list { list-style: none; }
.task-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 12px;
}
.task-item:last-child { border-bottom: none; }
.task-info { flex: 1; }
.task-title { font-size: 14px; color: var(--text-primary); font-weight: 500; }
.task-meta { font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* --- Restored & New Styles --- */

/* Breadcrumb */
.breadcrumb { font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; }
.breadcrumb a { color: var(--primary-color); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* Loading Overlay */
.loading-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,0.8); z-index: 2000; display: flex; justify-content: center; align-items: center; visibility: hidden; opacity: 0; transition: opacity 0.3s; }
.loading-overlay.active { visibility: visible; opacity: 1; }

/* Form Layouts */
.form-card { background: var(--white); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 24px; box-shadow: var(--card-shadow); }
.form-card h2 { font-size: 18px; margin-bottom: 20px; color: var(--text-primary); border-bottom: 1px solid var(--border-color); padding-bottom: 12px; }
.form-row { display: flex; gap: 24px; margin-bottom: 20px; }
.form-row .form-group { flex: 1; margin-bottom: 0; }
.form-row.full { flex-direction: column; }
.hint { font-size: 12px; color: var(--text-light); margin-top: 4px; display: block; }
.required { color: var(--danger-color); margin-left: 4px; }

/* Tags Input */
.tags-input { border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 8px; display: flex; flex-wrap: wrap; gap: 8px; min-height: 48px; background: #fff; box-shadow: var(--input-shadow); }
.tag { background: #e8f0fe; color: var(--primary-color); padding: 4px 10px; border-radius: 16px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.tag button { background: none; border: none; cursor: pointer; color: var(--primary-color); font-size: 16px; line-height: 1; }
#tag-input { border: none; box-shadow: none; outline: none; padding: 4px; flex: 1; min-width: 100px; }

/* Specs Table */
.specs-table { width: 100%; border: 1px solid var(--border-color); margin-bottom: 16px; }
.specs-table td { padding: 8px; border: 1px solid var(--border-color); }
.specs-table input { border: 1px solid transparent; background: transparent; padding: 4px; width: 100%; box-shadow: none; }
.specs-table input:focus { border-color: var(--primary-color); background: #fff; }
.specs-add-row { display: flex; gap: 12px; }
.btn-add-spec { padding: 8px 16px; background: var(--text-secondary); color: white; border: none; border-radius: var(--radius-sm); cursor: pointer; }

/* Image Upload */
.image-upload { border: 2px dashed var(--border-color); border-radius: var(--radius-lg); padding: 40px; text-align: center; cursor: pointer; transition: border-color 0.2s; background: #fafafa; }
.image-upload:hover, .image-upload.dragover { border-color: var(--primary-color); background: #f0f7ff; }
.image-preview { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 20px; }
.image-preview-item { position: relative; width: 100px; height: 100px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border-color); }
.image-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.image-preview-item button { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,0.6); color: white; border: none; border-radius: 50%; width: 20px; height: 20px; cursor: pointer; font-size: 14px; line-height: 1; }

/* Form Actions */
.form-actions { display: flex; justify-content: flex-end; gap: 16px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border-color); }

/* Project Status Colors */
.status-nk-waiting { background: #fde8e8; color: #e74c3c; }
.status-customer-waiting { background: #fef3e2; color: #f39c12; }
.status-in-progress { background: #e8f4fd; color: #3498db; }
.status-completed { background: #e8f8ef; color: #27ae60; }
.status-scheduled { background: #f0f0f0; color: #666; }

/* Stats Row - Horizontal layout for project status cards */
.stats-row {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stats-row .stat-card {
    flex: 1;
    min-width: 100px;
    max-width: 150px;
    padding: 12px 16px;
    cursor: pointer;
    text-align: center;
}

.stats-row .stat-card .stat-value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.stats-row .stat-card .stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Stat Cards Colors (Projects) */
.stat-card.nk-waiting { border-bottom: 4px solid #e74c3c; }
.stat-card.nk-waiting .stat-value { color: #e74c3c; }
.stat-card.customer-waiting { border-bottom: 4px solid #f39c12; }
.stat-card.customer-waiting .stat-value { color: #f39c12; }
.stat-card.in-progress { border-bottom: 4px solid #3498db; }
.stat-card.in-progress .stat-value { color: #3498db; }
.stat-card.completed { border-bottom: 4px solid #27ae60; }
.stat-card.completed .stat-value { color: #27ae60; }

/* Project Card */
.project-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    margin-bottom: 12px;
    border-left: 4px solid transparent;
    transition: var(--transition-base);
}
.project-card:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-hover); }
.project-main { flex: 1; }
.project-header { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.project-name { font-size: 16px; font-weight: 600; color: var(--text-primary); }
.project-meta { text-align: right; min-width: 150px; }
.project-deadline.urgent { color: var(--danger-color); font-weight: 600; }
.project-description { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.project-next-action { margin-top: 8px; padding: 8px 12px; background: #fff8e1; border-radius: 6px; font-size: 13px; color: #856404; display: inline-block; }

/* Tabs (Sales) */
.tabs { display: flex; margin-bottom: 24px; border-bottom: 1px solid var(--border-color); gap: 24px; background: var(--white); padding: 0 24px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; border: none; box-shadow: none; }
.tab { padding: 16px 0; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--text-secondary); border: none; border-bottom: 2px solid transparent; transition: var(--transition-base); background: transparent; outline: none; }
.tab:hover { color: var(--primary-color); }
.tab.active { color: var(--primary-color); border-bottom-color: var(--primary-color); }
.tab-content.hidden { display: none; }

/* Billing Status Badges */
.status-badge.status-draft { background: #e9ecef; color: #6c757d; }
.status-badge.status-waiting { background: #fff3cd; color: #856404; }
.status-badge.status-done { background: #d4edda; color: #155724; }

/* Line Items (Sales) */
.line-items { margin-bottom: 24px; }
.line-item { display: flex; gap: 16px; align-items: flex-end; padding: 16px; background: #f8f9fa; border-radius: var(--radius-md); margin-bottom: 12px; border: 1px solid var(--border-color); }
.line-item .form-group { margin-bottom: 0; }
.line-item-remove { color: var(--danger-color); cursor: pointer; padding: 8px; font-size: 18px; }
.add-line-btn { color: var(--primary-color); cursor: pointer; font-weight: 500; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; }

/* Summary Box (Sales) */
.summary-box { background: #f8f9fa; border-radius: var(--radius-lg); padding: 24px; border: 1px solid var(--border-color); }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.summary-row.total { font-size: 18px; font-weight: 700; border-top: 1px solid var(--border-color); padding-top: 16px; margin-top: 8px; }

/* Workflow (Catalogs) */
.workflow-section { background: var(--white); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--card-shadow); margin-bottom: 24px; }
.workflow-steps { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 12px; }
.workflow-step { flex: 0 0 200px; background: #f8f9fa; border-radius: var(--radius-md); padding: 16px; text-align: center; position: relative; border: 1px solid var(--border-color); }
.step-number { width: 28px; height: 28px; background: var(--primary-color); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; font-weight: 600; font-size: 14px; }
.step-title { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.step-desc { font-size: 11px; color: var(--text-secondary); }
/* Arrow for workflow */
.workflow-step:not(:last-child)::after { content: '→'; position: absolute; right: -12px; top: 50%; transform: translateY(-50%); color: var(--border-color); font-size: 18px; }

/* Prompt (Catalogs) */
.prompt-section { background: var(--white); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--card-shadow); margin-bottom: 24px; }
.prompt-box { background: #1a1a2e; border-radius: var(--radius-md); padding: 16px; position: relative; margin-top: 16px; }
.prompt-text { color: #e0e0e0; font-family: monospace; font-size: 13px; white-space: pre-wrap; max-height: 300px; overflow-y: auto; }
.copy-btn { position: absolute; top: 12px; right: 12px; padding: 4px 12px; background: rgba(255,255,255,0.2); color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; }

/* Summary Cards (Catalogs) */
.summary-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 24px; }
.summary-card { background: var(--white); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--card-shadow); border-left: 4px solid transparent; }
.summary-card.catalog { border-left-color: #3498db; }
.summary-card.flyer { border-left-color: #e74c3c; }
.summary-card.progress { border-left-color: #f39c12; }
.summary-label { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.summary-value { font-size: 28px; font-weight: 600; color: var(--text-primary); }
.summary-card.catalog .summary-value { color: #3498db; }
.summary-card.flyer .summary-value { color: #e74c3c; }
.summary-card.progress .summary-value { color: #f39c12; }

/* Sales List Card */
.sale-card { background: white; border-radius: 12px; padding: 16px 20px; border: 1px solid #e0e0e0; display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: all 0.2s; margin-bottom: 12px; }
.sale-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); transform: translateY(-2px); }
.sale-main { flex: 1; }
.sale-invoice { font-weight: 600; color: #333; margin-bottom: 4px; }
.sale-customer { font-size: 14px; color: #666; }
.sale-date { font-size: 13px; color: #999; margin-top: 4px; }
.sale-meta { text-align: right; }
.sale-amount { font-size: 18px; font-weight: 600; color: #333; }
.sale-status { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 12px; margin-top: 4px; }
.status-unpaid { background: #fff3cd; color: #856404; }
.status-paid { background: #d4edda; color: #155724; }

/* ============================================
   Header Logo
   ============================================ */
.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    height: 32px;
    width: auto;
}

.header-logo img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

/* ============================================
   Products Page Styles
   ============================================ */
.product-count {
    margin-left: auto;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.product-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: #f8f9fa;
}

.product-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.product-id {
    font-size: 12px;
    color: var(--text-light);
    font-family: monospace;
}

.price {
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, monospace;
}

td.actions {
    display: flex;
    gap: 8px;
}

/* ============================================
   Partners Page Styles
   ============================================ */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.partner-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: var(--transition-base);
    border: 1px solid rgba(0,0,0,0.02);
}

.partner-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

.partner-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #f0f0f0;
}

.partner-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.partner-type {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.type-agent { background: #e8f0fe; color: #1565c0; }
.type-direct { background: #e8f5e9; color: #2e7d32; }
.type-supplier { background: #fff3e0; color: #ef6c00; }
.type-other { background: #f5f5f5; color: #666; }

.partner-body {
    padding: 16px 20px;
}

.partner-info {
    margin-bottom: 12px;
}

.partner-info-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid #f8f8f8;
}

.partner-info-row:last-child {
    border-bottom: none;
}

.partner-info-label {
    color: var(--text-light);
    flex-shrink: 0;
}

.partner-info-value {
    color: var(--text-primary);
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-left: 12px;
}

.recent-activity {
    background: #f8f9fa;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    border-left: 3px solid var(--primary-color);
}

.activity-date {
    font-weight: 600;
    margin-right: 8px;
    color: var(--text-primary);
}

.partner-stats {
    display: flex;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.partner-stats .stat-item {
    text-align: center;
    flex: 1;
}

.partner-stats .stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.partner-stats .stat-label {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 2px;
}

.partner-footer {
    padding: 12px 20px;
    background: #fafafa;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    border-top: 1px solid #f0f0f0;
}

.partner-count {
    font-size: 14px;
    color: var(--text-secondary);
    margin-left: auto;
}

/* Empty State Enhancement */
.empty-state-icon {
    width: 60px;
    height: 60px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
    color: var(--text-light);
}

/* ============================================
   Secondary Button
   ============================================ */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: var(--white);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
}

.btn-secondary:hover {
    background: #f8f9fa;
    border-color: #d0d0d0;
}

/* ============================================
   Documents Page Styles
   ============================================ */
.document-types {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.document-type-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--card-shadow);
    transition: var(--transition-base);
    cursor: pointer;
    border: 1px solid transparent;
}

.document-type-card:hover {
    box-shadow: var(--card-shadow-hover);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.document-type-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.document-type-card p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ============================================
   Modal Enhancements
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.btn-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.2s;
}

.btn-close:hover {
    color: var(--text-primary);
}

/* ============================================
   Prompt Tabs (Catalogs)
   ============================================ */
.prompt-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.prompt-tab {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition-base);
}

.prompt-tab:hover {
    background: #f8f9fa;
}

.prompt-tab.active {
    background: #e8f0fe;
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 8px;
}

.filter-tab {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition-base);
}

.filter-tab:hover {
    background: #f8f9fa;
}

.filter-tab.active {
    background: #e8f0fe;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ============================================
   Catalog List Styles
   ============================================ */
.catalog-list {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.catalog-list-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.catalog-list-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.type-catalog { background: #e3f2fd; color: #1976d2; }
.type-flyer { background: #ffebee; color: #c62828; }

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.product-tag {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-secondary);
}

.gdrive-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--primary-color);
    font-size: 13px;
}

.gdrive-link:hover {
    text-decoration: underline;
}

.action-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition-base);
}

.action-btn:hover {
    background: #f8f9fa;
}

/* Checkbox Group */
.checkbox-group {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
}

.checkbox-item input {
    width: auto;
}

/* ============================================
   Batch Update Mode (Projects Page)
   ============================================ */

/* Copy all button header */
.batch-copy-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.btn-copy-all-main {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-base);
    box-shadow: 0 2px 8px rgba(230, 2, 18, 0.2);
}

.btn-copy-all-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(230, 2, 18, 0.3);
}

.btn-copy-all-main.copied {
    background: var(--success-color);
}

/* Project card wrapper with update input */
.project-card-wrapper {
    margin-bottom: 16px;
}

.project-card-wrapper .project-card {
    margin-bottom: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Project update row - always visible */
.project-update-row {
    background: #f5f5f5;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.project-update-row .update-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: var(--radius-md);
    font-size: 13px;
    background: white;
    transition: var(--transition-base);
}

.project-update-row .update-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(208, 60, 50, 0.1);
}

.project-update-row .update-input::placeholder {
    color: #999;
}

/* Project card adjustments */
.project-card {
    padding: 16px;
}

/* ============================================
   Modal Styles
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--header-bg-start), var(--header-bg-end));
    color: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
}

.modal-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 24px;
}

.customer-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.info-item span {
    font-size: 14px;
    color: var(--text-primary);
}

.customer-notes {
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.customer-notes label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 4px;
}

.customer-notes p {
    margin: 0;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.orders-table th,
.orders-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.orders-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
}

.orders-table tr:hover {
    background: #fafafa;
}

.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.status-badge.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-badge.status-in-progress {
    background: #fff3cd;
    color: #856404;
}

.status-badge.status-pending {
    background: #cce5ff;
    color: #004085;
}

/* ============================================
   Project View Page Styles
   ============================================ */

/* Page header with title group */
.page-title-group {
    flex: 1;
}

.page-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.page-meta .project-status {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.page-meta .project-customer {
    color: var(--text-secondary);
    font-size: 14px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.btn-back {
    padding: 8px 16px;
    background: #f0f0f0;
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-size: 13px;
}

.btn-back:hover {
    background: #e0e0e0;
}

/* Update Section */
.update-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--card-shadow);
    border-left: 4px solid var(--primary-color);
}

.update-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.update-title {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.update-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
}

.update-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(208, 60, 50, 0.1);
}

.update-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.btn-copy {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-base);
}

.btn-copy:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-copy.copied {
    background: var(--success-color);
}

/* Next Action Card */
.next-action-card {
    border-left: 4px solid #f39c12;
    margin-bottom: 24px;
}

.next-action-text {
    font-size: 15px;
    color: var(--text-primary);
    padding: 8px 0;
}

/* Content Grid - Two columns */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.left-column, .right-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Card Title */
.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Description Text */
.description-text {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-wrap;
    padding: 4px 0;
}

/* Next Action Card */
.next-action-card {
    border-left: 4px solid #3498db;
    padding: 20px 24px;
}

.next-action-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    padding: 4px 0;
}

/* Project View Card padding */
.content-grid .card {
    padding: 20px 24px;
}

/* Info Grid */
.info-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item.full-width {
    grid-column: span 2;
}

.info-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.info-value {
    font-size: 14px;
    color: var(--text-primary);
}

/* Deadline Badge */
.deadline-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
}

.deadline-normal {
    background: #e8f4fd;
    color: #3498db;
}

.deadline-soon {
    background: #fff3cd;
    color: #856404;
}

.deadline-urgent {
    background: #fde8e8;
    color: #e74c3c;
}

/* Drive Card */
.drive-card {
    background: #f8f9fa;
}

.drive-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-base);
}

.drive-link:hover {
    background: #f5f5f5;
    border-color: var(--primary-color);
}

.drive-link-icon {
    font-size: 24px;
}

.drive-link-text {
    flex: 1;
    font-size: 13px;
    word-break: break-all;
    color: var(--text-secondary);
}

.drive-link-arrow {
    font-size: 18px;
    color: var(--text-secondary);
}

.drive-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
}

.drive-empty-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.drive-empty-text {
    font-size: 13px;
}

.drive-btn-relink {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.drive-btn-relink:hover {
    background: #f0f0f0;
}

.drive-btn-relink.copied {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.drive-btn-secondary {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
}

.drive-btn-secondary:hover {
    background: #f0f0f0;
}

.drive-empty {
    text-align: center;
    padding: 20px;
}

.drive-empty-icon {
    font-size: 32px;
    margin-bottom: 8px;
    opacity: 0.5;
}

.drive-empty-text {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 12px;
}

/* History List */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary-color);
}

.history-date {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.history-content {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
}

/* Dashboard task list styles */
.task-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.task-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.task-item:last-child {
    border-bottom: none;
}

.task-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
}

.task-item a:hover {
    color: var(--primary-color);
}

.task-name {
    font-weight: 500;
}

.task-customer {
    font-size: 12px;
    color: var(--text-secondary);
}

.task-deadline {
    font-size: 12px;
    color: var(--text-secondary);
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 12px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}
