:root {
    /* Colors from kini.com.ua */
    --bg-cream: #F7F4EF;
    --primary-teal: #2E7D9A;
    --primary-teal-hover: #236178;
    --primary-teal-light: rgba(46, 125, 154, 0.08);
    --deep-navy: #0E2A3D;
    --deep-navy-light: rgba(14, 42, 61, 0.7);
    --amber-accent: #F4A93C;
    --amber-accent-hover: #e09328;
    --cyan-glow: #56CCF2;
    --cyan-glow-light: rgba(86, 204, 242, 0.25);
    --white: #FFFFFF;
    
    /* Semantic texts & states */
    --text-dark: #0E2A3D;
    --text-muted: #5A7184;
    --border-color: rgba(14, 42, 61, 0.08);
    --success-green: #27AE60;
    --success-bg: rgba(39, 174, 96, 0.08);
    --error-red: #EB5757;
    --error-bg: rgba(235, 87, 87, 0.08);
    --warning-orange: #F2994A;
    --warning-bg: rgba(242, 153, 74, 0.08);
    
    /* Fonts */
    --font-heading: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Layout styling */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    --shadow-soft: 0 10px 30px -10px rgba(14, 42, 61, 0.06);
    --shadow-medium: 0 20px 40px -15px rgba(14, 42, 61, 0.12);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.5;
    overflow-x: hidden;
    height: 100vh;
    width: 100vw;
    -webkit-font-smoothing: antialiased;
}

/* Loader Screen */
.loader-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: var(--bg-cream);
    transition: opacity 0.3s ease;
}

.loader {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-teal);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    margin-top: 16px;
    font-family: var(--font-heading);
    font-size: 15px;
    color: var(--text-muted);
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background-color: rgba(247, 244, 239, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--primary-teal);
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    color: var(--deep-navy);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.premium-badge {
    font-size: 9px;
    background-color: var(--amber-accent);
    color: var(--deep-navy);
    font-weight: 800;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(244, 169, 60, 0.25);
}

.user-name {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    color: var(--deep-navy-light);
}

/* Main Layout */
.app-content {
    padding: 20px 20px 90px 20px; /* spacing for bottom nav */
    max-width: 600px;
    margin: 0 auto;
}

.view-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    color: var(--deep-navy);
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

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

.view-header .view-title {
    margin-bottom: 0;
}

/* View transitions */
.view {
    animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Stat Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 16px;
    flex-shrink: 0;
}

.stat-icon.purple { background-color: rgba(46, 125, 154, 0.1); color: var(--primary-teal); }
.stat-icon.green { background-color: var(--success-bg); color: var(--success-green); }
.stat-icon.blue { background-color: rgba(86, 204, 242, 0.15); color: var(--primary-teal); }
.stat-icon.orange { background-color: var(--warning-bg); color: var(--amber-accent); }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    color: var(--deep-navy);
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Subscription Banner (compact top strip) */
.sub-banner {
    background: linear-gradient(135deg, var(--deep-navy) 0%, #16344a 100%);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(14, 42, 61, 0.18);
    position: relative;
    overflow: hidden;
}

.sub-banner::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -20px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--cyan-glow-light) 0%, transparent 70%);
    pointer-events: none;
}

.sub-banner-left {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1;
}

.sub-banner-icon {
    width: 34px;
    height: 34px;
    background: rgba(244, 169, 60, 0.2);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--amber-accent);
    font-size: 15px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(244, 169, 60, 0.3));
}

.sub-banner-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sub-banner .sub-status {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    color: var(--white);
}

.sub-banner .sub-expiry {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.55);
}

.sub-banner-plan {
    font-family: var(--font-heading);
    font-size: 9px;
    font-weight: 800;
    color: var(--amber-accent);
    background: rgba(244, 169, 60, 0.15);
    border: 1px solid rgba(244, 169, 60, 0.3);
    padding: 3px 8px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
    white-space: nowrap;
}

.dashboard-title {
    font-size: 20px;
    margin-bottom: 14px;
}

/* Search Bar */
.search-bar-container {
    position: relative;
    margin-bottom: 20px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

#client-search {
    width: 100%;
    padding: 14px 16px 14px 42px;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-dark);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    box-shadow: var(--shadow-soft);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

#client-search:focus {
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 3px var(--primary-teal-light);
}

/* Items List layout */
.items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Cards style */
.card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow-soft);
}

/* Client list item */
.client-item {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.client-item:active {
    transform: scale(0.98);
    border-color: var(--primary-teal);
    box-shadow: 0 2px 8px rgba(46, 125, 154, 0.1);
}

.client-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.client-name {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--deep-navy);
}

.client-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}

.client-username {
    color: var(--primary-teal);
    font-weight: 600;
}

.client-dogs {
    display: flex;
    align-items: center;
    gap: 4px;
}

.client-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.badge {
    font-family: var(--font-heading);
    font-size: 10px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.active { background-color: var(--success-bg); color: var(--success-green); }
.badge.invited { background-color: var(--warning-bg); color: var(--warning-orange); }
.badge.inactive { background-color: var(--error-bg); color: var(--error-red); }
.badge.archived { background-color: rgba(90, 113, 132, 0.1); color: var(--text-muted); }

.streak-tag {
    font-size: 12px;
    color: var(--amber-accent);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Template item card */
.template-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.template-card:not(.template-card-collapsed) {
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 3px var(--primary-teal-light), var(--shadow-soft);
}

.template-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    cursor: pointer;
    user-select: none;
    gap: 12px;
}

.template-card-header:active {
    background-color: var(--bg-cream);
}

.template-header-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.template-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.template-chevron {
    font-size: 13px;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}

.template-task-count {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.template-media-badge {
    display: inline-flex;
    align-items: center;
    background: var(--primary-teal-light);
    color: var(--primary-teal);
    padding: 1px 6px;
    border-radius: var(--radius-full);
    font-size: 10px;
    gap: 3px;
}

.template-expanded-body {
    border-top: 1px solid var(--border-color);
    padding: 14px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: slideDown 0.2s ease-out;
}

.template-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--deep-navy);
}

.btn-delete-template {
    background: none;
    border: none;
    color: var(--error-red);
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-full);
    transition: background-color var(--transition-fast);
}

.btn-delete-template:hover {
    background-color: var(--error-bg);
}

.template-meta-info {
    font-size: 11px;
    color: var(--text-muted);
}

.tasks-list-preview {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-preview-item {
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-dark);
}

.task-number {
    background-color: var(--primary-teal-light);
    color: var(--primary-teal);
    width: 22px;
    height: 22px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 1px;
}

.task-text {
    flex-grow: 1;
    line-height: 1.4;
}

.task-freq {
    font-size: 11px;
    color: var(--primary-teal);
    background-color: var(--primary-teal-light);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px;
}

.task-media-preview {
    margin-top: 6px;
}

.task-media-loading {
    font-size: 12px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}


/* Buttons */
.btn {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    padding: 10px 18px;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color var(--transition-fast), transform 0.1s, box-shadow var(--transition-fast);
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background-color: var(--primary-teal);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(46, 125, 154, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-teal-hover);
    box-shadow: 0 6px 16px rgba(46, 125, 154, 0.3);
}

.btn-secondary {
    background-color: var(--primary-teal-light);
    color: var(--primary-teal);
}

.btn-secondary:hover {
    background-color: rgba(46, 125, 154, 0.15);
}

.btn-dashed {
    border: 2px dashed var(--primary-teal);
    background: none;
    color: var(--primary-teal);
}

.btn-dashed:hover {
    background-color: var(--primary-teal-light);
}

.btn-block {
    width: 100%;
    padding: 14px;
    font-size: 15px;
}

/* Forms */
.form-card {
    gap: 18px;
}

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

.form-group label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
}

.form-group input, .form-group select {
    background-color: var(--bg-cream);
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    padding: 12px 14px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    outline: none;
    font-size: 14px;
    transition: border-color var(--transition-fast);
}

.form-group input:focus, .form-group select:focus {
    border-color: var(--primary-teal);
}

/* Form task list layout */
.tasks-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    border-top: 1px solid var(--border-color);
    padding-top: 18px;
}

.tasks-section h3 {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--deep-navy);
}

.form-task-item {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow-soft);
}

.btn-remove-task-form {
    position: absolute;
    top: 12px;
    right: 12px;
    color: var(--error-red);
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
}

/* Navigation Bar */
.app-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 68px;
    background-color: var(--white);
    border-top: 1px solid var(--border-color);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 20px rgba(14, 42, 61, 0.04);
    z-index: 100;
}

.nav-item {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    flex-grow: 1;
    height: 100%;
    justify-content: center;
    transition: color var(--transition-fast);
}

.nav-item i {
    font-size: 18px;
}

.nav-item.active {
    color: var(--primary-teal);
    font-weight: 700;
}

/* Customize scrollbars to match website style */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-cream);
}
::-webkit-scrollbar-thumb {
    background: var(--primary-teal);
    border-radius: var(--radius-full);
}

/* Expanded client item */
.client-item.expanded {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    cursor: default;
}

.client-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    cursor: pointer;
}

.client-expanded-content {
    display: none;
    border-top: 1px solid var(--border-color);
    padding-top: 14px;
    animation: slideDown 0.25s ease-out forwards;
}

.client-item.expanded .client-expanded-content {
    display: block;
}

.client-expanded-details-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.detail-row {
    font-size: 13px;
    color: var(--text-dark);
}

.detail-row strong {
    color: var(--deep-navy);
    font-weight: 700;
}

.client-action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.client-action-buttons .btn {
    flex: 1;
    font-size: 12px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

.btn-archive {
    background-color: var(--warning-bg);
    color: var(--warning-orange);
}

.btn-archive:hover {
    background-color: rgba(242, 153, 74, 0.15);
}

.btn-restore {
    background-color: var(--success-bg);
    color: var(--success-green);
}

.btn-restore:hover {
    background-color: rgba(39, 174, 96, 0.15);
}

.btn-delete {
    background-color: var(--error-bg);
    color: var(--error-red);
}

.btn-delete:hover {
    background-color: rgba(235, 87, 87, 0.15);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- CIRCULAR PROGRESS RING STATS --- */
.circular-progress-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.circular-progress-container {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.6s ease-in-out;
}

.progress-value {
    position: absolute;
    font-size: 11px;
    font-weight: 700;
    color: var(--deep-navy);
}


/* --- WEEKLY COMPLETIONS BAR CHART --- */
.chart-card {
    margin-top: 15px;
    padding: 16px;
}

.chart-title {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    color: var(--deep-navy);
    margin-bottom: 12px;
}

.bar-chart-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 100px;
    padding: 10px 5px 0 5px;
    border-bottom: 1px solid var(--border-color);
}

.bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    height: 100%;
    justify-content: flex-end;
}

.bar-wrapper {
    width: 16px;
    height: 70%;
    background-color: rgba(46, 125, 154, 0.08);
    border-radius: var(--radius-full);
    position: relative;
    overflow: hidden;
}

.bar-fill {
    width: 100%;
    background: linear-gradient(180deg, var(--primary-teal) 0%, #4FA3C1 100%);
    position: absolute;
    bottom: 0;
    border-radius: var(--radius-full);
    transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.bar-label {
    margin-top: 6px;
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
}


/* --- LIVE ACTIVITY FEED SECTION --- */
.activity-feed-section {
    margin-top: 20px;
}

.feed-title {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    color: var(--deep-navy);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.feed-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feed-item {
    display: flex;
    align-items: center;
    background-color: var(--white);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    transition: transform var(--transition-fast);
}

.feed-item:hover {
    transform: translateY(-2px);
}

.feed-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 12px;
    font-size: 14px;
    flex-shrink: 0;
}

.feed-icon.completion {
    background-color: var(--primary-teal-light);
    color: var(--primary-teal);
}

.feed-icon.streak {
    background-color: rgba(244, 169, 60, 0.1);
    color: var(--amber-accent);
}

.feed-icon.join {
    background-color: var(--success-bg);
    color: var(--success-green);
}

.feed-content {
    flex-grow: 1;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.4;
}

.feed-time {
    font-size: 9px;
    color: var(--text-muted);
    white-space: nowrap;
    margin-left: 10px;
}

.feed-media-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background-color: var(--primary-teal-light);
    color: var(--primary-teal);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    margin-top: 4px;
    cursor: pointer;
    border: none;
    font-weight: 600;
}


/* --- VIDEO REVIEW CARD LAYOUT --- */
.video-review-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.video-review-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-color);
    overflow: hidden;
    animation: fadeIn 0.3s ease;
}

.video-card-header {
    padding: 12px 16px;
    background-color: var(--deep-navy);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-card-header h3 {
    font-size: 14px;
    font-weight: 600;
}

.video-card-header p {
    font-size: 11px;
    color: var(--cyan-glow);
    margin-top: 2px;
}

.video-nav-badge {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    background: rgba(255,255,255,0.15);
    padding: 3px 8px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

/* Video player area — fixed 16:9 aspect ratio */
.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-card-instruction {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
    padding: 20px 14px 10px 14px;
    color: var(--white);
    font-size: 11px;
    line-height: 1.4;
    pointer-events: none;
}

/* Video play overlay button — always centered within 16:9 box */
.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.65);
    border-radius: var(--radius-full);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background var(--transition-fast), transform 0.15s;
    z-index: 5;
}

.video-play-overlay:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-play-overlay.playing {
    opacity: 0;
    pointer-events: none;
}

.video-wrapper:hover .video-play-overlay.playing {
    opacity: 1;
    pointer-events: auto;
}

/* Fullscreen button — bottom-right corner */
.video-fullscreen-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    font-size: 13px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    z-index: 6;
    transition: background var(--transition-fast), transform 0.15s;
}

.video-fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.video-card-feedback-form {
    padding: 14px 16px;
    background-color: var(--white);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feedback-textarea {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    font-size: 13px;
    font-family: inherit;
    resize: none;
    outline: none;
    background: var(--bg-cream);
    color: var(--text-dark);
    transition: border-color var(--transition-fast);
    min-height: 72px;
}

.feedback-textarea:focus {
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 3px var(--primary-teal-light);
}

.video-swiper-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.video-swiper-actions .btn {
    padding: 11px;
    font-size: 13px;
    font-weight: 700;
}

/* Video nav row */
.video-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px;
}

.video-nav-count {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
}

.video-nav-btn {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    color: var(--deep-navy);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
    box-shadow: var(--shadow-soft);
}

.video-nav-btn:hover:not(:disabled) {
    background-color: var(--primary-teal-light);
    border-color: var(--primary-teal);
    color: var(--primary-teal);
}

.video-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.empty-state-card {
    text-align: center;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-icon {
    font-size: 48px;
    color: var(--primary-teal);
    margin-bottom: 16px;
}

.empty-state-card h3 {
    font-size: 16px;
    color: var(--deep-navy);
    margin-bottom: 8px;
}

.empty-state-card p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}



/* --- CLIENT SIDE MINI APP LAYOUT --- */
.dog-profile-card {
    background: linear-gradient(135deg, var(--deep-navy) 0%, #1c3d52 100%);
    color: var(--white);
    padding: 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
    margin-bottom: 20px;
}

.dog-profile-main {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.dog-avatar-icon {
    width: 44px;
    height: 44px;
    background-color: var(--primary-teal);
    border-radius: var(--radius-full);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
}

.dog-info-text {
    flex-grow: 1;
}

.dog-name-display {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
}

.dog-breed-display {
    font-size: 11px;
    color: var(--cyan-glow);
}

.streak-badge-container {
    background-color: rgba(244, 169, 60, 0.2);
    border: 1px solid var(--amber-accent);
    color: var(--amber-accent);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
}

.level-progress-container {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 12px;
}

.level-badge {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}

.progress-bar-wrapper {
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-teal) 0%, var(--cyan-glow) 100%);
    border-radius: var(--radius-full);
    transition: width 0.5s ease-out;
}

.xp-ratio {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    display: block;
    text-align: right;
}

.checklist-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checklist-item {
    background-color: var(--white);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.checklist-item.expanded .checklist-arrow i {
    transform: rotate(180deg);
}

.checklist-details {
    border-top: 1px dashed var(--border-color);
    padding-top: 10px;
}

.checklist-item.checked {
    border-color: var(--success-green);
    background-color: rgba(39, 174, 96, 0.02);
}

.checklist-checkbox-container {
    position: relative;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

.checklist-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--primary-teal);
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    font-size: 12px;
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.checklist-item.checked .checklist-checkbox {
    background-color: var(--success-green);
    border-color: var(--success-green);
}

.checklist-info {
    flex-grow: 1;
}

.checklist-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--deep-navy);
    line-height: 1.4;
    transition: color var(--transition-fast);
}

.checklist-item.checked .checklist-title {
    color: var(--text-muted);
    text-decoration: line-through;
}

.checklist-meta {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

.checklist-comment {
    background-color: rgba(244, 169, 60, 0.08);
    border-left: 2px solid var(--amber-accent);
    padding: 6px 8px;
    margin-top: 6px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 11px;
    color: #8c5d15;
}


/* --- ACHIEVEMENTS GRID & BADGES --- */
.badges-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.badge-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 12px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.4;
    filter: grayscale(100%);
    transition: opacity var(--transition-fast), filter var(--transition-fast), transform var(--transition-fast);
}

.badge-card.unlocked {
    opacity: 1;
    filter: none;
    border-color: var(--amber-accent);
    background: linear-gradient(180deg, var(--white) 0%, rgba(244, 169, 60, 0.02) 100%);
}

.badge-card.unlocked:hover {
    transform: translateY(-2px);
}

.badge-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.badge-title {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    color: var(--deep-navy);
    margin-bottom: 4px;
}

.badge-desc {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.4;
}


/* --- NUDGE & GENDER PRESET BUTTONS --- */
/* Client filter tabs */
.client-filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.filter-tab {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background-color: var(--white);
    color: var(--text-muted);
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

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

.filter-tab:not(.active):hover {
    border-color: var(--primary-teal);
    color: var(--primary-teal);
}

.nudge-preset-btn {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    color: var(--deep-navy);
    font-size: 11px;
    font-weight: 600;
    padding: 8px 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.nudge-preset-btn:hover {
    border-color: var(--primary-teal);
}

.nudge-preset-btn.active {
    background-color: var(--primary-teal);
    border-color: var(--primary-teal);
    color: var(--white);
}


/* --- MODAL DIALOGS OVERLAY --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(14, 42, 61, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 16px;
    transition: opacity 0.25s ease;
}

.modal-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
    width: 100%;
    max-width: 320px;
    overflow: hidden;
    animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

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

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    color: var(--deep-navy);
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 16px;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-body {
    padding: 16px;
}
