/* ==========================================================================
   Ruth Digitizing Mockup Dashboard - Styles
   Used by: dashboards/art-hub-ruth.html, dashboards/ae-dashboard.html

   Theme colors controlled by CSS variables. Defaults to purple.
   AE dashboard overrides with maroon via :root in ae-dashboard.html.
   ========================================================================== */

:root {
    --art-theme: #6B46C1;
    --art-theme-dark: #553C9A;
    --art-theme-light: #8B5CF6;
    --art-theme-bg: #f8f5ff;
    --art-theme-bg-hover: #f3f0ff;
    --art-theme-rgba-15: rgba(107,70,193,0.15);
    --art-theme-rgba-10: rgba(107,70,193,0.1);
}

/* ---------- Base ---------- */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background-color: #f5f5f5;
}

/* ---------- Header ---------- */
.mockup-header {
    background: var(--art-theme);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    height: 40px;
    filter: brightness(0) invert(1);
}

.header-title {
    color: white;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

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

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 50px;
}

.profile-photo {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid white;
    object-fit: cover;
}

.profile-info { color: white; }
.profile-info h3 { margin: 0; font-size: 15px; font-weight: 600; }
.profile-info p { margin: 2px 0 0 0; font-size: 12px; opacity: 0.9; }

.header-btn {
    color: white;
    text-decoration: none;
    font-size: 13px;
    padding: 7px 14px;
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 4px;
    transition: all 0.3s;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}

.header-btn:hover {
    background: white;
    color: var(--art-theme);
    border-color: white;
}

/* ---------- Tab Navigation ---------- */
.tab-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.tab-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-wrap: wrap;
}

.tab-button {
    background: #f0f0f0;
    border: none;
    padding: 10px 16px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
    color: #333;
    white-space: nowrap;
    font-family: inherit;
}

.tab-button:hover { background: #e0e0e0; }
.tab-button.active { background: var(--art-theme); color: white; }

.tab-badge {
    display: inline-block;
    background: rgba(255,255,255,0.3);
    color: inherit;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
    font-weight: 600;
}

.tab-button.active .tab-badge {
    background: rgba(255,255,255,0.3);
    color: white;
}

/* ---------- Tab Content ---------- */
.tab-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tab-pane { display: none; }
.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

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

.tab-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--art-theme);
}

/* ---------- Status Summary Bar ---------- */
.status-summary {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.status-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--art-theme-bg);
    border: 1px solid #e9e0f5;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.status-stat:hover { background: #efe8ff; }
.status-stat.active { background: var(--art-theme); color: white; border-color: var(--art-theme); }

.status-stat-count {
    font-weight: 700;
    font-size: 18px;
}

.status-stat-label {
    font-weight: 500;
    color: #666;
}

.status-stat.active .status-stat-label { color: rgba(255,255,255,0.9); }

/* ---------- Card Grid ---------- */
.mockup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.mockup-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

/* ---------- Status Left Border Colors ---------- */
.mockup-card--submitted          { border-left: 3px solid #7c3aed; }
.mockup-card--in-progress        { border-left: 3px solid #2563eb; }
.mockup-card--awaiting-approval  { border-left: 3px solid #d97706; }
.mockup-card--revision-requested { border-left: 3px solid #dc2626; }
.mockup-card--approved           { border-left: 3px solid #059669; }
.mockup-card--completed          { border-left: 3px solid #22c55e; opacity: 0.8; }

/* ---------- Card Hover Lift + Status Glow ---------- */
.mockup-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12), 0 4px 10px rgba(0,0,0,0.08);
}
.mockup-card--submitted:hover          { box-shadow: 0 8px 25px rgba(124,58,237,0.2); }
.mockup-card--in-progress:hover        { box-shadow: 0 8px 25px rgba(37,99,235,0.2); }
.mockup-card--awaiting-approval:hover  { box-shadow: 0 8px 25px rgba(217,119,6,0.2); }
.mockup-card--revision-requested:hover { box-shadow: 0 8px 25px rgba(220,38,38,0.2); }
.mockup-card--approved:hover           { box-shadow: 0 8px 25px rgba(5,150,105,0.2); }
.mockup-card--completed:hover          { box-shadow: 0 8px 25px rgba(34,197,94,0.15); }

/* ---------- Staggered Card Entry Animation ---------- */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.mockup-card {
    animation: fadeSlideUp 0.35s ease both;
}

/* ---------- Animated Status Badges ---------- */
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(217,119,6,0.4); }
    50%      { box-shadow: 0 0 0 6px rgba(217,119,6,0); }
}
@keyframes gentleShake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-2px); }
    40%      { transform: translateX(2px); }
    60%      { transform: translateX(-1px); }
    80%      { transform: translateX(1px); }
}
.status-pill--awaiting-approval { animation: pulseGlow 2s ease-in-out infinite; }
.card-badge--overdue            { animation: gentleShake 0.6s ease-in-out; animation-delay: 1s; }

/* ---------- Skeleton Loading ---------- */
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skeleton-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    min-height: 200px;
}
.skeleton-header {
    height: 52px;
    background: linear-gradient(90deg, var(--art-theme-rgba-10) 25%, var(--art-theme-rgba-15) 50%, var(--art-theme-rgba-10) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}
.skeleton-body {
    padding: 14px;
}
.skeleton-line {
    height: 12px;
    border-radius: 4px;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}
.skeleton-line--short  { width: 60%; }
.skeleton-line--medium { width: 80%; }
.skeleton-line--long   { width: 95%; }
.skeleton-line--pill   { width: 30%; height: 20px; border-radius: 10px; }

/* ---------- Thread Color Dots ---------- */
.thread-dots {
    display: flex;
    gap: 3px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #f3f4f6;
}
.thread-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.15);
    flex-shrink: 0;
}
.thread-dots-label {
    font-size: 9px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-right: 4px;
    font-weight: 600;
}

.card-header {
    background: linear-gradient(145deg, var(--art-theme), var(--art-theme-dark));
    color: white;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-header-left { flex: 1; min-width: 0; }

.card-company {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-design-number {
    font-size: 13px;
    opacity: 0.85;
    margin-top: 2px;
}

.card-header-right {
    flex-shrink: 0;
    margin-left: 12px;
}

/* ---------- Card Thumbnail ---------- */
.card-thumb {
    width: 100%;
    max-height: 180px;
    overflow: hidden;
    background: #f5f5f5;
}

.card-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

/* ---------- Approval Elapsed ---------- */
.approval-elapsed { font-size: 12px; padding: 4px 0; }
.approval-elapsed--fresh { color: #16a34a; }
.approval-elapsed--waiting { color: #d97706; }
.approval-elapsed--overdue { color: #dc2626; }

/* ---------- Status Pills ---------- */
.status-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.status-pill--submitted {
    background: rgba(255,255,255,0.9);
    color: #7c3aed;
}

.status-pill--in-progress {
    background: rgba(255,255,255,0.9);
    color: #2563eb;
}

.status-pill--awaiting-approval {
    background: rgba(255,255,255,0.9);
    color: #d97706;
}

.status-pill--completed {
    background: rgba(255,255,255,0.9);
    color: #059669;
}

.status-pill--approved {
    background: rgba(255,255,255,0.9);
    color: #059669;
}

.status-pill--revision-requested {
    background: rgba(255,255,255,0.9);
    color: #dc2626;
}

/* ---------- Card Body ---------- */
.card-body {
    padding: 14px 16px;
}

.card-design-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: #666;
}

.card-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-meta-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.6;
}

.card-meta-label { font-weight: 500; color: #888; }

.card-badges {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.card-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: var(--art-theme-bg-hover);
    color: var(--art-theme);
}

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

.card-badge--due-soon {
    background: #fff7ed;
    color: #ea580c;
}

/* ---------- Card Footer ---------- */
.card-footer {
    padding: 10px 16px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-date {
    font-size: 12px;
    color: #999;
}

.card-action-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--art-theme);
    text-decoration: none;
    transition: color 0.2s;
}

.card-action-link:hover { color: var(--art-theme-dark); }

/* ---------- Quick Action Buttons ---------- */
.card-actions {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
}

.card-action-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.card-action-btn--start {
    background: #3b82f6;
    color: white;
}
.card-action-btn--start:hover { background: #2563eb; }

.card-action-btn--send {
    background: #f59e0b;
    color: white;
}
.card-action-btn--send:hover { background: #d97706; }

.card-action-btn--complete {
    background: #10b981;
    color: white;
}
.card-action-btn--complete:hover { background: #059669; }

/* ---------- Loading / Empty States ---------- */
.mockup-loading {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.mockup-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: var(--art-theme);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

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

.mockup-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.mockup-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.mockup-empty-text {
    font-size: 16px;
    font-weight: 500;
}

.mockup-error {
    text-align: center;
    padding: 40px 20px;
    color: #dc2626;
    background: #fef2f2;
    border-radius: 8px;
    border: 1px solid #fecaca;
}

/* ---------- Billing Codes (reused from old Ruth page) ---------- */
.billing-codes-section {
    background: linear-gradient(135deg, #F3E5F5 0%, #EDE7F6 100%);
    border: 2px solid var(--art-theme);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px var(--art-theme-rgba-10);
}

.billing-codes-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.billing-codes-icon {
    background: var(--art-theme);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.billing-codes-title {
    margin: 0;
    color: var(--art-theme);
    font-size: 20px;
    font-weight: 600;
}

.billing-codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.billing-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.billing-card-header {
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.billing-card-header--purple { background: var(--art-theme-light); }
.billing-card-header--dark { background: #7C3AED; }

.billing-card-pn { font-size: 24px; font-weight: bold; }
.billing-card-subtitle { font-size: 14px; opacity: 0.95; margin-top: 2px; }
.billing-card-price { font-size: 28px; font-weight: bold; }

.billing-card-body { padding: 20px; }
.billing-card-body-title { font-weight: 600; color: #333; margin-bottom: 10px; font-size: 15px; }
.billing-card-body-desc { color: #666; font-size: 14px; line-height: 1.6; margin-bottom: 15px; }

.billing-callout {
    padding: 10px 15px;
    border-radius: 4px;
}

.billing-callout--purple {
    background: #F3E5F5;
    border-left: 3px solid var(--art-theme);
}

.billing-callout--amber {
    background: #FFF8E1;
    border-left: 3px solid #FFC107;
}

.billing-callout-label { font-weight: 600; font-size: 13px; margin-bottom: 5px; }
.billing-callout-label--purple { color: var(--art-theme); }
.billing-callout-label--amber { color: #F57C00; }

.billing-callout ul {
    margin: 5px 0 0 0;
    padding-left: 20px;
    font-size: 13px;
    color: #555;
}

.billing-increments-grid {
    display: grid;
    grid-template-columns: auto auto;
    gap: 5px 15px;
    font-size: 13px;
    color: #555;
}

.billing-increments-grid .amount { font-weight: 600; }

.billing-pro-tip {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.billing-pro-tip-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #333;
}

/* ---------- Toast Notification ---------- */
.mockup-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 14px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.mockup-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.mockup-toast--success { background: #059669; }
.mockup-toast--error { background: #dc2626; }
.mockup-toast--info { background: var(--art-theme); }

/* ---------- Audit Badges ---------- */
.audit-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.audit-badge--green { background: #ecfdf5; color: #059669; border: 1px solid #059669; }
.audit-badge--red { background: #fef2f2; color: #dc2626; border: 1px solid #dc2626; }
.audit-badge--amber { background: #fffbeb; color: #d97706; border: 1px solid #d97706; }

/* ==========================================================================
   Kanban Board View (Ruth)
   ========================================================================== */

/* ---------- View Toggle ---------- */
.view-toggle {
    display: inline-flex;
    gap: 0;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
    margin-left: auto;
}
.view-toggle-btn {
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    background: white;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: inherit;
}
.view-toggle-btn:not(:last-child) {
    border-right: 1px solid #d1d5db;
}
.view-toggle-btn:hover {
    background: #f3f4f6;
}
.view-toggle-btn.active {
    background: var(--art-theme);
    color: white;
    border-color: var(--art-theme);
}
.view-toggle-icon {
    font-size: 14px;
    line-height: 1;
}

/* Kanban styles moved to /shared_components/css/kanban.css */

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .mockup-header { flex-direction: column; gap: 10px; padding: 10px; }
    .header-right { flex-wrap: wrap; justify-content: center; }
    .mockup-grid { grid-template-columns: 1fr; }
    .tab-buttons { flex-direction: column; }
    .status-summary { flex-direction: column; }
    .user-profile { display: none; }
}
