/**
 * My Cards — Dashboard styles
 * Extracted from mycards.html for template migration
 */
:root {
    --primary: #e67e73;
    --primary-dark: #d15a4f;
    --secondary: #6ab0b8;
    --theme-plum: #633b46;
    --theme-rose: #8f4e5c;
    --theme-ink: #4f3640;
    --theme-line: rgba(222, 187, 176, 0.45);
    --theme-line-strong: rgba(209, 151, 138, 0.58);
    --theme-surface: rgba(255, 252, 249, 0.96);
    --theme-surface-soft: rgba(247, 235, 241, 0.92);
    --theme-shadow: rgba(137, 89, 106, 0.16);
    --bg-mica: rgba(255, 249, 246, 0.76);
    --bg-acrylic: rgba(255, 248, 244, 0.72);
    --text-main: #1a1a1a;
    --text-dark: #4f3640;
    --text-muted: #7a6170;
    --white: #ffffff;
    --gray-100: #f0f0f0;
    --gray-200: #e4e4e4;
    --gray-300: #c4c4c4;
    --green: #0f7b0f;
    --blue: #0067c0;
    --orange: #ca5010;
    --border-subtle: rgba(162, 106, 116, 0.12);
    --border-default: rgba(177, 120, 130, 0.18);
    --border-strong: rgba(177, 120, 130, 0.3);
    --shadow-card: 0 10px 28px rgba(125, 73, 92, 0.10), 0 4px 12px rgba(125, 73, 92, 0.07);
    --shadow-elevated: 0 18px 40px rgba(125, 73, 92, 0.14), 0 8px 20px rgba(125, 73, 92, 0.10);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Nunito', system-ui, sans-serif;
    background:
        radial-gradient(circle at 12% 12%, rgba(255, 227, 208, 0.8), transparent 28%),
        radial-gradient(circle at 88% 18%, rgba(255, 241, 201, 0.7), transparent 24%),
        linear-gradient(145deg, #f5e0e7 0%, #d9e5f4 46%, #f8ecdf 100%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.dashboard-layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 280px;
    background: var(--bg-mica);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-right: 1px solid var(--border-subtle);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}
.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    text-decoration: none;
    color: inherit;
}
.logo-circle {
    width: 2.75rem;
    height: 2.75rem;
    background: linear-gradient(135deg, #d98980, #b96872);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 24px rgba(137, 89, 106, 0.24);
}
.sidebar-title { font-family: 'Dancing Script', cursive; font-size: 1.7rem; color: var(--theme-plum); margin-bottom: 0.25rem; }
.sidebar-subtitle { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.nav-section { margin-bottom: 1.5rem; }
.nav-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); padding-left: 0.75rem; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    color: var(--text-main);
    transition: all 0.1s ease;
    text-decoration: none;
    position: relative;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}
.nav-item:hover { background: rgba(217, 137, 128, 0.10); }
.nav-item.active { background: rgba(217, 137, 128, 0.14); color: var(--theme-rose); }
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background: linear-gradient(180deg, #d98980 0%, #b96872 100%);
    border-radius: 2px;
}
.nav-item i { width: 1.25rem; height: 1.25rem; color: var(--text-muted); }
.nav-badge {
    margin-left: auto;
    background: linear-gradient(135deg, #d98980, #b96872);
    color: var(--white);
    font-size: 0.65rem;
    padding: 2px 7px;
    border-radius: 99px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}
.main-content { flex: 1; margin-left: 0; padding: 5rem 1rem 2rem 1rem; max-width: 100%; }
@media (min-width: 769px) {
    .main-content { margin-left: 280px; padding: 2rem 2.5rem; max-width: none; }
}
.welcome-header {
    background: var(--bg-acrylic);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-default);
    box-shadow: var(--shadow-card);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.welcome-text h1 { font-family: 'Dancing Script', cursive; font-size: 2.25rem; color: var(--theme-plum); margin-bottom: 0.25rem; }
.welcome-text p { color: var(--text-muted); margin: 0; }
.metrics-row { display: flex; gap: 0.75rem; }
.metric-card {
    background: linear-gradient(180deg, rgba(255, 252, 249, 0.94) 0%, rgba(247, 235, 241, 0.88) 100%);
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-md);
    text-align: center;
    min-width: 90px;
    border: 1px solid var(--border-subtle);
}
.metric-value { font-size: 1.5rem; font-weight: 700; color: var(--text-dark); }
.metric-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.02em; }
.metric-card.sent { border-bottom: 2px solid var(--green); background: linear-gradient(180deg, rgba(15, 123, 15, 0.06) 0%, rgba(255, 255, 255, 0.6) 100%); }
.metric-card.scheduled { border-bottom: 2px solid var(--blue); background: linear-gradient(180deg, rgba(0, 103, 192, 0.06) 0%, rgba(255, 255, 255, 0.6) 100%); }
.metric-card.drafts { border-bottom: 2px solid var(--orange); background: linear-gradient(180deg, rgba(202, 80, 16, 0.06) 0%, rgba(255, 255, 255, 0.6) 100%); }
.metric-card.opened { border-bottom: 2px solid #7c3aed; background: linear-gradient(180deg, rgba(124, 58, 237, 0.06) 0%, rgba(255, 255, 255, 0.6) 100%); }
.quick-actions { display: flex; gap: 0.75rem; margin-bottom: 1.5rem; }
.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
    border: 1.5px solid transparent;
    cursor: pointer;
    font-size: 0.8rem;
}
.action-btn.primary { background: transparent; color: var(--theme-rose); border-color: rgba(209, 151, 138, 0.72); }
.action-btn.primary:hover { background: linear-gradient(135deg, #d98980, #b96872); color: white; border-color: transparent; }
.action-btn.secondary { background: transparent; color: var(--theme-ink); border-color: rgba(177, 120, 130, 0.5); }
.action-btn.secondary:hover { background: linear-gradient(135deg, #f2c6b6, #e0a8b5); color: var(--theme-plum); border-color: transparent; }
.filter-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.filter-tabs {
    display: flex;
    gap: 2px;
    background: rgba(255, 248, 244, 0.72);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}
.filter-tab {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-muted);
    transition: all 0.1s ease;
    border: none;
    background: transparent;
}
.filter-tab:hover { color: var(--theme-plum); background: rgba(255, 255, 255, 0.5); }
.filter-tab.active { background: var(--white); color: var(--theme-plum); box-shadow: 0 8px 18px rgba(137, 89, 106, 0.10); }
.search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 251, 248, 0.82);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.875rem;
}
.search-box input { border: none; outline: none; font-size: 0.875rem; width: 180px; background: transparent; }
.search-box i { color: var(--text-muted); width: 1rem; height: 1rem; }
.cards-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    width: 100%;
    min-height: 100px;
}
.card-item {
    background: linear-gradient(180deg, var(--theme-surface) 0%, var(--theme-surface-soft) 100%);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-default);
    box-shadow: var(--shadow-card);
    transition: all 0.15s ease;
}
.card-item .card-thumb { overflow: hidden; }
.card-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-elevated); border-color: var(--border-strong); }
.card-thumb {
    height: 180px;
    background: linear-gradient(180deg, rgba(255, 248, 244, 0.98) 0%, rgba(246, 231, 238, 0.92) 100%);
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.card-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 0.5rem; }
.card-type {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(79, 54, 64, 0.76);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.6rem;
    font-weight: 600;
    z-index: 2;
}
.card-status {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
}
.card-status.sent { background: rgba(15, 123, 15, 0.15); color: var(--green); }
.card-status.scheduled { background: rgba(0, 103, 192, 0.15); color: var(--blue); }
.card-status.draft { background: rgba(202, 80, 16, 0.15); color: var(--orange); }
.card-status.favourite { background: rgba(236, 72, 153, 0.12); color: #db2777; }
.card-status.ready { background: rgba(15, 123, 15, 0.15); color: var(--green); }
.card-status.opened { background: rgba(124, 58, 237, 0.12); color: #7c3aed; }
.card-body { padding: 0.875rem; }
.card-title { font-weight: 600; font-size: 0.9rem; color: var(--text-dark); margin-bottom: 0.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { font-size: 0.7rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.card-schedule { font-size: 0.65rem; color: var(--blue); margin-bottom: 0.5rem; padding: 0.3rem 0.6rem; background: rgba(0, 103, 192, 0.08); border-radius: var(--radius-sm); display: inline-flex; align-items: center; gap: 0.25rem; font-weight: 600; }
.card-schedule.sent { background: rgba(15, 123, 15, 0.08); color: var(--green); }
.card-status.bounced { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.card-schedule.bounced { background: rgba(239, 68, 68, 0.08); color: #ef4444; }
.card-bounce-reason { font-size: 0.65rem; color: #ef4444; margin: 0.2rem 0 0.45rem; line-height: 1.45; padding: 0 0.1rem; }
.card-bounce-alert {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 1.75rem;
    height: 1.75rem;
    background: #ef4444;
    color: #fff;
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.55);
    z-index: 2;
    line-height: 1;
    cursor: default;
    pointer-events: none;
}
.card-actions { display: flex; gap: 0.4rem; padding-top: 0.75rem; flex-wrap: wrap; align-items: center; }
.card-actions button, .card-actions a {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.7rem;
    text-align: center;
    cursor: pointer;
    border: 1.5px solid transparent;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}
.card-actions .btn-view { background: transparent; color: var(--theme-rose); border-color: rgba(209, 151, 138, 0.72); min-width: 4rem; }
.card-actions .btn-view:hover { background: linear-gradient(135deg, #d98980, #b96872); color: white; border-color: transparent; }
.card-actions .btn-share { background: transparent; color: var(--theme-ink); border-color: rgba(177, 120, 130, 0.5); min-width: 4rem; }
.card-actions .btn-share:hover { background: linear-gradient(135deg, #f2c6b6, #e0a8b5); color: var(--theme-plum); border-color: transparent; }
.card-actions .btn-delete { background: transparent; color: #c42b1c; border-color: #c42b1c; flex: 0 0 auto; min-width: 2.25rem; padding: 0.4rem 0.5rem; }
.card-actions .btn-delete:hover { background: #c42b1c; color: white; }
.load-more-container { display: flex; justify-content: center; margin-top: 2rem; }
.load-more-btn {
    background: linear-gradient(180deg, rgba(255, 252, 249, 0.94) 0%, rgba(247, 235, 241, 0.88) 100%);
    border: 1px solid var(--border-default);
    color: var(--text-main);
    padding: 0.625rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.cards-count { text-align: center; font-size: 0.75rem; color: var(--text-muted); margin-top: 1rem; }
.storage-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 1rem;
    padding: 0.7rem 0.875rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(107, 114, 128, 0.25);
    background: rgba(249, 250, 251, 0.85);
    color: var(--text-muted, #7a6170);
    font-size: 0.8rem;
    line-height: 1.5;
}
.storage-notice-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.storage-notice-dismiss {
    margin-left: auto;
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.1rem;
    color: inherit;
    opacity: 0.6;
    line-height: 1;
}
.storage-notice-dismiss:hover { opacity: 1; }
.sync-status {
    margin-bottom: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 103, 192, 0.25);
    background: rgba(0, 103, 192, 0.08);
    color: #0b4f8a;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.sync-status.warning {
    border-color: rgba(202, 80, 16, 0.3);
    background: rgba(202, 80, 16, 0.08);
    color: #7a3009;
}
.animate-spin {
    animation: spin 1s linear infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(180deg, var(--theme-surface) 0%, var(--theme-surface-soft) 100%);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-default);
}
.empty-state i { width: 3.5rem; height: 3.5rem; color: var(--gray-300); margin-bottom: 1rem; }
.empty-state h3 { font-family: 'Dancing Script', cursive; font-size: 2rem; margin-bottom: 0.5rem; color: var(--theme-plum); }
.empty-state p { color: var(--text-muted); margin-bottom: 1.5rem; }
.mobile-header { display: none; }
.mobile-header-inner { display: flex; justify-content: space-between; align-items: center; }
.mobile-nav-toggle { background: none; border: none; cursor: pointer; padding: 0.5rem; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; }
#mobile-nav-dialog {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
#mobile-nav-dialog.visible { opacity: 1; pointer-events: auto; }
.dialog-content {
    background: var(--bg-mica);
    backdrop-filter: blur(30px);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    max-width: 90%;
    width: 320px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-default);
}

/* Storybook Luxe mycards theme */
.sidebar,
.welcome-header,
.filter-tabs,
.search-box,
.card-item,
.metric-card,
.load-more-btn,
.empty-state,
.dialog-content,
.sync-status {
    box-shadow: 0 16px 36px var(--theme-shadow), 0 0 0 1px rgba(255, 255, 255, 0.52) inset;
}

.sidebar,
.welcome-header,
.dialog-content,
.empty-state {
    background: linear-gradient(180deg, rgba(255, 252, 249, 0.82) 0%, rgba(247, 235, 241, 0.74) 100%);
}

.sidebar {
    border-right-color: var(--theme-line);
}

.mobile-header {
    background: linear-gradient(180deg, rgba(255, 252, 249, 0.88) 0%, rgba(247, 235, 241, 0.8) 100%);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-bottom: 1px solid var(--theme-line);
    box-shadow: 0 10px 24px rgba(137, 89, 106, 0.08);
}

.nav-label,
.cards-count,
.welcome-text p,
.card-meta,
.empty-state p,
.search-box input::placeholder {
    color: rgba(79, 54, 64, 0.72);
}

.metric-value,
.card-title,
.filter-tab.active,
.load-more-btn,
.action-btn.secondary,
.card-actions .btn-share {
    color: var(--theme-ink);
}

.search-box i,
.nav-item.active i {
    color: var(--theme-rose);
}

.card-item:hover,
.load-more-btn:hover {
    border-color: var(--theme-line-strong);
    box-shadow: 0 22px 46px rgba(125, 73, 92, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.58) inset;
}

.load-more-btn:hover {
    background: linear-gradient(135deg, #d98980, #b96872);
    color: #fff;
}

.sync-status {
    border-color: rgba(177, 120, 130, 0.24);
    background: rgba(255, 247, 242, 0.86);
    color: var(--theme-ink);
}

.sync-status.warning {
    border-color: rgba(202, 80, 16, 0.25);
    background: rgba(255, 240, 229, 0.92);
    color: #8f4318;
}

.mobile-nav-toggle:hover {
    background: rgba(217, 137, 128, 0.10);
    border-radius: var(--radius-md);
}
@media (max-width: 768px) {
    html, body { overflow-x: hidden; }
    .dashboard-layout { display: block; }
    .sidebar { display: none !important; }
    .mobile-header { display: block !important; }
    .welcome-header { flex-direction: column !important; align-items: stretch !important; padding: 1rem !important; }
    .welcome-text { width: 100%; }
    .metrics-row { display: grid !important; grid-template-columns: 1fr 1fr; gap: 0.5rem; width: 100%; }
    .metric-card { min-width: 0 !important; }
    .quick-actions { display: grid !important; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
    .action-btn { justify-content: center; min-width: 0; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .cards-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important; gap: 0.75rem !important; }
}
