/* Sarveh Honar user portal — Swiss / cultural, light canvas
   Aligns with admin: slate + teal. Vazirmatn for Persian. */

html.user-app {
    --color-primary: #0f172a;
    --color-on-primary: #ffffff;
    --color-accent: #0f766e;
    --color-accent-hover: #0d9488;
    --color-on-accent: #ffffff;
    --color-background: #f1f5f9;
    --color-foreground: #0f172a;
    --color-card: #ffffff;
    --color-muted: #f8fafc;
    --color-muted-foreground: #64748b;
    --color-border: #e2e8f0;
    --color-destructive: #dc2626;
    --color-warning: #b45309;
    --color-success: #047857;
    --color-info: #0369a1;
    --color-ring: #0f766e;
    --header-height: 72px;
    --radius: 12px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.07);
    --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.12);
    --font: "Vazirmatn", system-ui, sans-serif;
    --ease: 180ms ease;
}

html.user-app,
body.user-app {
    background: var(--color-background) !important;
    color: var(--color-foreground) !important;
    font-family: var(--font);
    line-height: 1.7;
    min-height: 100%;
}

html.user-app *:not(code):not(kbd):not(pre):not(svg):not(path),
html.user-app button,
html.user-app input,
html.user-app select,
html.user-app textarea,
html.user-app .form-control,
html.user-app .form-select,
html.user-app .btn,
html.user-app label,
html.user-app span,
html.user-app small,
html.user-app p,
html.user-app a {
    font-family: var(--font) !important;
}

html.user-app ::placeholder,
html.user-app input::placeholder,
html.user-app textarea::placeholder,
html.user-app .form-control::placeholder,
html.user-app .form-select::placeholder {
    font-family: var(--font) !important;
    color: #94a3b8;
    opacity: 1;
}

html.user-app input::-webkit-input-placeholder,
html.user-app textarea::-webkit-input-placeholder {
    font-family: var(--font) !important;
}

html.user-app input::-moz-placeholder,
html.user-app textarea::-moz-placeholder {
    font-family: var(--font) !important;
    opacity: 1;
}

html.user-app .datepicker-plot-area,
html.user-app .datepicker-plot-area *,
html.user-app .pwt-datepicker,
html.user-app .pwt-datepicker * {
    font-family: var(--font) !important;
}

body.user-app {
    margin: 0;
}

body.user-app a {
    color: var(--color-accent);
}

.user-icon-svg,
html.user-app .admin-icon {
    display: inline-block;
    flex-shrink: 0;
    vertical-align: middle;
}

.skip-link {
    position: absolute;
    right: 12px;
    top: -48px;
    z-index: 2000;
    background: var(--color-primary);
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
}

.skip-link:focus {
    top: 12px;
    outline: 2px solid var(--color-ring);
    outline-offset: 2px;
    color: #fff;
}

/* ---------- Auth ---------- */
body.user-app.login-page {
    background: var(--color-background) !important;
    min-height: 100vh;
    display: block;
    align-items: stretch;
}

html.user-app .login-container {
    display: grid;
    grid-template-columns: minmax(280px, 42%) 1fr;
    width: 100%;
    max-width: none;
    min-height: 100vh;
    box-shadow: none;
}

html.user-app .login-left-panel {
    background:
        radial-gradient(ellipse at 20% 0%, rgba(13, 148, 136, 0.28), transparent 50%),
        linear-gradient(165deg, #0f172a 0%, #134e4a 100%);
    padding: 48px 40px;
    position: sticky;
    top: 0;
    height: 100vh;
}

html.user-app .festival-logo {
    gap: 24px;
}

html.user-app .logo-text {
    color: #fff;
}

html.user-app .persian-text,
html.user-app .persian-text-small {
    color: #fff;
    font-weight: 700;
}

html.user-app .persian-text {
    font-size: 26px;
}

html.user-app .persian-text-small {
    font-size: 18px;
    color: #99f6e4;
}

html.user-app .english-text {
    color: #cbd5e1;
    font-size: 13px;
    max-width: 280px;
    margin-inline: auto;
}

html.user-app .logo-circle {
    background: var(--color-accent);
}

html.user-app .login-right-panel {
    background: var(--color-background);
    padding: 40px 24px;
}

html.user-app .login-form-container {
    max-width: 440px;
    text-align: right;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: var(--shadow-md);
}

html.user-app .login-form-container.register-wide {
    max-width: 560px;
}

html.user-app .user-icon {
    color: var(--color-accent);
    margin-bottom: 12px;
    display: none;
}

html.user-app .login-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-foreground);
    text-align: right;
}

html.user-app .login-lead {
    color: var(--color-muted-foreground);
    font-size: 14px;
    margin-bottom: 24px;
}

html.user-app .login-form {
    text-align: right;
}

html.user-app .form-group label,
html.user-app .form-label,
html.user-app label:not(.form-check-label):not(.btn) {
    color: var(--color-foreground) !important;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
    display: block;
    width: 100%;
    float: none !important;
    text-align: right !important;
}

html.user-app .form-check-label {
    display: inline;
    width: auto;
    font-weight: 500;
    text-align: right !important;
}

html.user-app .form-group input,
html.user-app .form-group select,
html.user-app .form-group textarea,
html.user-app .form-group .form-select,
html.user-app .form-control,
html.user-app .form-select {
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 14px;
    color: var(--color-foreground);
    background: #fff;
}

html.user-app .form-group input:focus,
html.user-app .form-group select:focus,
html.user-app .form-control:focus,
html.user-app .form-select:focus {
    border-color: var(--color-accent) !important;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18) !important;
}

html.user-app .btn,
html.user-app .btn-primary,
html.user-app .btn-login {
    background: var(--color-accent) !important;
    border-color: var(--color-accent) !important;
    color: #fff !important;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.3;
    padding: 8px 14px;
    transform: none !important;
    box-shadow: none !important;
}

html.user-app .btn-primary:hover,
html.user-app .btn-login:hover {
    background: var(--color-accent-hover) !important;
    border-color: var(--color-accent-hover) !important;
}

html.user-app .btn-secondary {
    background: #fff !important;
    border: 1px solid var(--color-border) !important;
    color: var(--color-foreground) !important;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 14px;
}

html.user-app .btn-secondary:hover {
    background: var(--color-muted) !important;
    color: var(--color-foreground) !important;
}

html.user-app .btn-success {
    background: var(--color-success) !important;
    border-color: var(--color-success) !important;
    padding: 8px 14px;
    font-size: 13px;
}

html.user-app .btn-sm,
html.user-app .btn-compact,
html.user-app .btn-primary.btn-sm,
html.user-app .btn-primary.btn-compact,
html.user-app .btn-lg {
    padding: 6px 12px !important;
    font-size: 12px !important;
    border-radius: 8px;
    min-height: 0;
}

html.user-app .btn-outline-light {
    border-color: var(--color-border) !important;
    color: var(--color-foreground) !important;
}

html.user-app .btn-outline-light:hover {
    background: var(--color-muted) !important;
    color: var(--color-foreground) !important;
}

html.user-app .link,
html.user-app .login-links a,
html.user-app .login-form a {
    color: var(--color-accent);
    font-size: 13px;
}

html.user-app .login-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}

html.user-app .checkbox-group label,
html.user-app .form-check-label {
    color: var(--color-foreground) !important;
}

html.user-app .profile-image-placeholder {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    border: 1px dashed var(--color-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: var(--color-muted);
    color: var(--color-muted-foreground);
    margin-inline: auto;
}

html.user-app .password-input-wrapper input {
    padding-left: 44px;
    padding-right: 14px;
}

html.user-app .toggle-password {
    right: auto;
    left: 10px;
}

html.user-app .avatar-pick-btn {
    margin-top: 10px;
    padding: 8px 14px;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
}

/* ---------- Shell ---------- */
html.user-app .dashboard-page {
    background: var(--color-background) !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

html.user-app .dashboard-container {
    max-width: none;
    margin: 0;
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

html.user-app .user-header,
html.user-app header.user-header.dashboard-header {
    position: sticky;
    top: 0;
    z-index: 40;
    height: auto;
    min-height: var(--header-height);
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    padding: 10px 24px;
    margin-bottom: 0;
    flex-wrap: wrap;
}

html.user-app .user-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--color-foreground);
    min-width: 0;
    flex: 1 1 auto;
}

html.user-app .user-brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 13px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--color-accent);
}

html.user-app .user-brand-mark.has-image {
    width: auto;
    height: auto;
    max-width: none;
    border-radius: 0;
    background: transparent;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

html.user-app .user-brand-mark img,
html.user-app .user-brand-mark.has-image img {
    width: auto !important;
    height: auto !important;
    max-width: min(280px, 42vw);
    max-height: 64px;
    object-fit: contain;
    object-position: center right;
    display: block;
    aspect-ratio: auto;
}

html.user-app .user-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

html.user-app .user-brand-text strong {
    font-size: 14px;
}

html.user-app .user-brand-text span {
    font-size: 11px;
    color: var(--color-muted-foreground);
    font-weight: 400;
}

html.user-app .user-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

html.user-app .user-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-muted-foreground);
    font-size: 13px;
    font-weight: 600;
}

html.user-app .user-nav a:hover,
html.user-app .user-nav a.active {
    background: rgba(15, 118, 110, 0.1);
    color: var(--color-accent);
}

html.user-app .user-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

html.user-app .user-menu-btn {
    background: var(--color-muted);
    color: var(--color-background) !important;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 6px 12px 6px 8px;
    font-size: 13px;
    font-weight: 600;
}

html.user-app .user-menu-btn:hover,
html.user-app .user-menu-btn:focus {
    background: #fff;
    color: var(--color-background) !important;
    border-color: var(--color-accent);
}

html.user-app .user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 12px;
}

html.user-app .user-name {
    color: var(--color-border) !important;
}

html.user-app .user-menu-dropdown {
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 6px;
    min-width: 220px;
}

html.user-app .user-menu-dropdown .dropdown-item {
    color: var(--color-foreground);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
}

html.user-app .user-menu-dropdown .dropdown-item:hover,
html.user-app .user-menu-dropdown .dropdown-item:focus {
    background: var(--color-muted);
    color: var(--color-foreground);
}

html.user-app .user-footer {
    background: #fff;
    border-top: 1px solid var(--color-border);
    color: var(--color-muted-foreground);
    padding: 18px 24px;
    text-align: center;
    font-size: 13px;
    margin-top: auto;
}

html.user-app .user-footer p {
    margin: 0;
    color: var(--color-muted-foreground);
}

/* ---------- Main ---------- */
html.user-app .dashboard-main {
    text-align: right;
    padding: 32px 40px 48px;
    max-width: none;
    margin: 0 auto;
    width: 100%;
    background: transparent !important;
    min-height: calc(100vh - var(--header-height) - 70px);
    color: var(--color-foreground);
}

html.user-app .content-panel,
html.user-app .content-panel.is-wide {
    width: 100%;
    max-width: none;
    margin-inline: 0;
}

html.user-app .content-panel .card,
html.user-app .content-panel .data-card,
html.user-app .dashboard-main > .card {
    width: 100%;
    max-width: none !important;
}

html.user-app .auth-main {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 32px 32px 48px;
    min-height: calc(100vh - 40px);
}

html.user-app .auth-main .container {
    max-width: none;
    padding: 0;
    margin: 0;
}

html.user-app .page-toolbar .page-lead {
    margin-bottom: 0;
}

html.user-app .dashboard-title,
html.user-app .page-title {
    color: var(--color-foreground) !important;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px;
    text-align: right;
}

html.user-app .page-lead {
    color: var(--color-muted-foreground);
    margin-bottom: 28px;
    font-size: 14px;
}

html.user-app .page-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

html.user-app .page-toolbar.is-centered {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 14px;
    margin-bottom: 28px;
}

html.user-app .page-toolbar.is-centered .page-title,
html.user-app .page-toolbar.is-centered .page-lead {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

html.user-app .track-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

html.user-app .category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
    max-width: none;
    margin: 0;
}

html.user-app .dash-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 14px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 22px 20px;
    text-decoration: none !important;
    color: var(--color-foreground) !important;
    box-shadow: var(--shadow-sm);
    min-height: 176px;
    transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

html.user-app .dash-card:hover {
    border-color: #99d4d5;
    box-shadow: 0 10px 24px rgba(49, 143, 145, 0.14);
    transform: translateY(-3px);
    color: var(--color-foreground) !important;
}

html.user-app .dash-card.is-disabled {
    opacity: 0.62;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    background: #f8fafc;
}

html.user-app .dash-card.is-disabled:hover {
    transform: none;
    border-color: var(--color-border);
    box-shadow: none;
}

html.user-app .dash-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: #318f91;
    color: #fff;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    overflow: hidden;
}

html.user-app .dash-card-icon svg {
    width: 32px !important;
    height: 32px !important;
    max-width: 32px;
    max-height: 32px;
    display: block;
    color: currentColor;
}

html.user-app .dash-card-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
}

html.user-app .dash-card-icon svg [stroke] {
    stroke: currentColor !important;
}

html.user-app .dash-card-icon svg [fill]:not([fill="none"]) {
    fill: currentColor !important;
}

html.user-app .dash-card-icon svg [fill="none"] {
    fill: none !important;
}

html.user-app .dash-card-body {
    min-width: 0;
    width: 100%;
    flex: 1;
    text-align: center;
}

html.user-app .dash-card h3,
html.user-app .dash-card h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--color-foreground) !important;
    line-height: 1.45;
    text-align: center;
}

html.user-app .dash-card p {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--color-muted-foreground) !important;
    text-align: center;
    line-height: 1.7;
}

html.user-app .section-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

html.user-app .section-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 22px 20px;
    box-shadow: var(--shadow-sm);
    min-height: 196px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    text-decoration: none !important;
    color: var(--color-foreground) !important;
    transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

html.user-app .section-card:hover {
    border-color: #99d4d5;
    box-shadow: 0 10px 24px rgba(49, 143, 145, 0.14);
    transform: translateY(-3px);
    color: var(--color-foreground) !important;
}

html.user-app .section-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #318f91;
    color: #fff;
    display: grid;
    place-items: center;
    margin-bottom: 6px;
}

html.user-app .section-label {
    color: var(--color-muted-foreground) !important;
    font-size: 12px;
    margin: 0;
    font-weight: 500;
}

html.user-app .section-title {
    color: var(--color-foreground) !important;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.45;
}

html.user-app .section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: var(--color-accent);
    color: #fff !important;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 600;
    font-size: 13px;
    margin-top: 4px;
}

html.user-app .section-card:hover .section-link {
    background: var(--color-accent-hover);
}

html.user-app .category-intro {
    max-width: 720px;
    margin: 0 auto 28px;
    padding: 16px 20px;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 12px;
    color: #134e4a;
    font-size: 14px;
    line-height: 1.9;
    text-align: center;
}

html.user-app .format-card {
    margin-top: 28px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 22px 24px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

html.user-app .format-card h3 {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 700;
    color: var(--color-foreground);
}

html.user-app .format-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
}

html.user-app .format-chips li {
    background: #f0fdfa;
    color: #0f766e;
    border: 1px solid #99f6e4;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
}

html.user-app .format-limit {
    margin: 0;
    font-size: 13px;
    color: var(--color-muted-foreground);
}

html.user-app .back-btn,
html.user-app .back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-accent) !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

html.user-app .register-page-head {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    text-align: center;
    gap: 8px;
    margin-bottom: 28px;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: space-between;
}

html.user-app .register-page-head .back-btn {
    margin: 0 0 4px;
}

html.user-app .register-page-head .page-title {
    text-align: center;
    margin-bottom: 0;
}

html.user-app .register-page-head .page-lead {
    text-align: center;
    margin-bottom: 0;
}

html.user-app .agreement-card {
    max-width: 760px !important;
    margin-inline: auto;
}

html.user-app .agreement-card .card-body {
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

html.user-app .agreement-intro {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.9;
    color: var(--color-foreground);
    text-align: center;
    margin: 0 0 20px;
}

html.user-app .agreement-box {
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 12px;
    padding: 20px 22px;
    margin-bottom: 24px;
    text-align: right;
}

html.user-app .agreement-note {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 600;
    color: #0f766e;
    line-height: 1.8;
}

html.user-app .agreement-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.9;
    color: var(--color-foreground);
    text-align: right;
}

html.user-app .agreement-check input {
    width: 18px;
    height: 18px;
    margin: 5px 0 0;
    flex-shrink: 0;
    accent-color: #318f91;
}

html.user-app .agreement-check a {
    color: var(--color-accent);
    font-weight: 700;
    text-decoration: underline;
}

html.user-app .agreement-continue {
    align-self: center;
    min-width: 200px;
    padding: 12px 28px !important;
    font-size: 14px !important;
}

html.user-app .agreement-continue.is-disabled {
    pointer-events: none;
    opacity: 0.45;
}

html.user-app .register-card .card-body {
    padding: 28px 32px;
}

html.user-app .registration-form,
html.user-app .registration-form .form-section,
html.user-app .registration-form .form-section p,
html.user-app .registration-form .form-section div,
html.user-app .registration-form .form-label {
    color: var(--color-foreground) !important;
}

html.user-app .registration-form .form-section {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 24px;
    margin-bottom: 24px;
}

html.user-app .registration-form .form-section:last-of-type {
    border-bottom: 0;
    margin-bottom: 8px;
}

html.user-app .registration-form .form-submit {
    display: flex;
    justify-content: center;
    padding-top: 8px;
    text-align: center;
}

html.user-app .registration-form .form-submit .btn-lg {
    padding: 12px 32px !important;
    font-size: 14px !important;
    min-width: 200px;
}

html.user-app .category-subtitle {
    color: var(--color-muted-foreground) !important;
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 24px;
}

/* ---------- Surfaces / bootstrap cards ---------- */
html.user-app .card {
    background: var(--color-card) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-sm);
    color: var(--color-foreground);
    width: 100%;
}

html.user-app .card-header {
    background: var(--color-muted) !important;
    color: var(--color-foreground) !important;
    border-bottom: 1px solid var(--color-border) !important;
    border-radius: var(--radius) var(--radius) 0 0 !important;
    padding: 16px 20px;
}

html.user-app .card-header.bg-primary,
html.user-app .card-header.bg-primary.text-white {
    background: var(--color-muted) !important;
    color: var(--color-foreground) !important;
}

html.user-app .card-title,
html.user-app .card-header h1,
html.user-app .card-header h4,
html.user-app .card-header .h4 {
    color: var(--color-foreground) !important;
}

html.user-app .card-body {
    color: var(--color-foreground) !important;
    text-align: right;
}

html.user-app .card-body .form-label,
html.user-app .card-body .text-muted,
html.user-app .registration-form .form-label,
html.user-app .person-form .form-label {
    color: var(--color-foreground) !important;
    float: none !important;
    display: block;
    width: 100%;
    text-align: right !important;
}

html.user-app .registration-form .text-muted {
    color: var(--color-muted-foreground) !important;
}

html.user-app .table {
    color: var(--color-foreground);
}

html.user-app .table thead th {
    font-size: 12px;
    color: var(--color-muted-foreground);
    font-weight: 600;
    border-bottom-color: var(--color-border);
}

html.user-app .badge {
    font-weight: 600;
    border-radius: 999px;
    padding: 5px 10px;
}

html.user-app .status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
}

html.user-app .status-pill.is-submitted {
    background: #fef3c7;
    color: #92400e;
}

html.user-app .status-pill.is-review {
    background: #e0f2fe;
    color: #075985;
}

html.user-app .status-pill.is-accepted {
    background: #d1fae5;
    color: #065f46;
}

html.user-app .status-pill.is-rejected {
    background: #fee2e2;
    color: #991b1b;
}

html.user-app .status-pill.is-other {
    background: var(--color-muted);
    color: var(--color-muted-foreground);
}

html.user-app .data-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

html.user-app .panel-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-card);
    margin: 0;
}

html.user-app .panel-table th,
html.user-app .panel-table td {
    padding: 12px 16px;
    text-align: right;
    border-bottom: 1px solid var(--color-border);
    font-size: 13px;
    vertical-align: middle;
}

html.user-app .panel-table th {
    background: var(--color-muted);
    font-size: 11px;
    letter-spacing: 0.02em;
    color: var(--color-muted-foreground);
    font-weight: 600;
}

html.user-app .panel-table tbody tr:last-child td {
    border-bottom: 0;
}

html.user-app .panel-table tbody tr:hover {
    background: #f8fafc;
}

html.user-app .tracking-code {
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important;
    font-size: 12px;
    font-weight: 600;
    background: var(--color-muted);
    border: 1px solid var(--color-border);
    color: var(--color-foreground);
    padding: 3px 8px;
    border-radius: 6px;
    direction: ltr;
    unicode-bidi: isolate;
}

html.user-app .cell-title {
    font-weight: 650;
    color: var(--color-foreground);
    line-height: 1.4;
}

html.user-app .cell-meta,
html.user-app .cell-date {
    color: var(--color-muted-foreground);
    font-size: 12px;
}

html.user-app .cell-actions {
    white-space: nowrap;
    text-align: left;
}

html.user-app .table-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-accent) !important;
    text-decoration: none;
    padding: 5px 8px;
    border-radius: 7px;
    border: 1px solid transparent;
}

html.user-app .table-action:hover {
    background: rgba(15, 118, 110, 0.08);
    border-color: #99f6e4;
}

html.user-app .count-chip {
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--color-muted);
    color: var(--color-muted-foreground);
    font-size: 12px;
    font-weight: 600;
}

html.user-app .status-pill {
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 650;
}

@media (max-width: 720px) {
    html.user-app .track-table thead {
        display: none;
    }

    html.user-app .track-table,
    html.user-app .track-table tbody,
    html.user-app .track-table tr,
    html.user-app .track-table td {
        display: block;
        width: 100%;
    }

    html.user-app .track-table tr {
        padding: 14px 16px 12px;
        border-bottom: 1px solid var(--color-border);
    }

    html.user-app .track-table td {
        padding: 4px 0;
        border: 0;
    }

    html.user-app .cell-actions {
        text-align: right;
        padding-top: 8px !important;
    }
}

html.user-app .empty-state {
    text-align: center !important;
    padding: 48px 20px;
    background: var(--color-card);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius);
}

html.user-app .empty-state p,
html.user-app .card-body .empty-state,
html.user-app .card-body .empty-state p {
    text-align: center !important;
}

html.user-app .empty-state p {
    color: var(--color-muted-foreground);
    margin-bottom: 16px;
}

html.user-app .alert {
    border-radius: 10px;
    border: 1px solid transparent;
    text-align: right;
}

html.user-app .alert-info {
    background: #ecfeff;
    border-color: #a5f3fc;
    color: #155e75;
}

html.user-app .detail-list td {
    color: var(--color-foreground);
}

html.user-app .auth-main .card-body,
html.user-app .auth-main p,
html.user-app .auth-main li,
html.user-app .auth-main h5 {
    color: var(--color-foreground);
    text-align: right;
}

html.user-app .agreement-text-black {
    color: var(--color-foreground) !important;
}

html.user-app a.btn {
    text-decoration: none;
}

html.user-app .registration-form .form-section {
    border-bottom: 1px solid var(--color-border);
}

html.user-app .registration-form .form-section h3,
html.user-app .registration-form .person-form h3,
html.user-app .registration-form .person-form h4,
html.user-app .registration-form .photo-info-form h4 {
    color: var(--color-foreground) !important;
    border-bottom-color: var(--color-border);
}

html.user-app .registration-form .text-muted {
    color: var(--color-muted-foreground) !important;
}

html.user-app .registration-form .person-form,
html.user-app .registration-form .photo-info-form {
    background: var(--color-muted);
    border-color: var(--color-border);
}

html.user-app .person-image-section {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
    text-align: center !important;
}

html.user-app .person-photo-picker,
html.user-app .person-photo-picker * {
    text-align: center !important;
}

html.user-app .person-photo-picker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: min(100%, 180px);
}

html.user-app .person-image-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

html.user-app .person-photo-frame {
    position: relative;
    display: block;
    width: 120px;
    height: 120px;
    margin: 0;
    border-radius: 18px;
    background: #fff;
    border: 1px dashed #cbd5e1;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

html.user-app .person-photo-frame:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
}

html.user-app .person-photo-frame:focus-within,
html.user-app .person-image-input:focus-visible + .btn-choose-image,
html.user-app .person-image-input:focus-visible ~ .btn-choose-image {
    outline: none;
}

html.user-app .person-photo-frame:has(+ .person-image-input:focus-visible),
html.user-app .person-photo-frame:focus-visible {
    outline: 2px solid var(--color-ring);
    outline-offset: 3px;
    border-color: var(--color-accent);
}

html.user-app .person-image,
html.user-app .person-photo-picker .person-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
    border-radius: 0;
    display: none;
}

html.user-app .person-photo-picker.has-photo .person-image {
    display: block;
}

html.user-app .person-photo-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

html.user-app .person-photo-picker.has-photo .person-photo-empty {
    display: none;
}

html.user-app .person-photo-hover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.58);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transition: opacity var(--ease);
    pointer-events: none;
}

html.user-app .person-photo-frame:hover .person-photo-hover,
html.user-app .person-photo-frame:focus-visible .person-photo-hover,
html.user-app .person-photo-picker.has-photo .person-photo-frame:hover .person-photo-hover {
    opacity: 1;
}

html.user-app .person-image-role,
html.user-app .person-photo-picker .person-image-role {
    position: absolute;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    z-index: 2;
    width: auto;
    max-width: calc(100% - 12px);
    margin: 0;
    padding: 3px 8px;
    border-radius: 999px;
    background: #fff;
    color: var(--color-foreground);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html.user-app .person-photo-frame:hover .person-image-role,
html.user-app .person-photo-frame:focus-visible .person-image-role {
    opacity: 0;
}

html.user-app .person-image-overlay {
    display: none;
}

html.user-app .btn-choose-image,
html.user-app label.btn-choose-image {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    min-width: 132px;
    padding: 8px 14px;
    margin: 0;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #fff;
    color: var(--color-foreground);
    font-size: 13px;
    font-weight: 650;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
    box-shadow: none;
    transition: background var(--ease), border-color var(--ease), color var(--ease);
}

html.user-app .btn-choose-image:hover,
html.user-app label.btn-choose-image:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}

html.user-app .person-image-input:focus-visible + .btn-choose-image {
    outline: 2px solid var(--color-ring);
    outline-offset: 3px;
}

html.user-app .person-photo-hint {
    font-size: 11px;
    color: var(--color-muted-foreground);
    line-height: 1.4;
}

@media (max-width: 576px) {
    html.user-app .person-photo-frame {
        width: 108px;
        height: 108px;
    }

    html.user-app .btn-choose-image,
    html.user-app label.btn-choose-image {
        min-height: 44px;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html.user-app .person-photo-frame,
    html.user-app .person-photo-hover,
    html.user-app .btn-choose-image {
        transition: none;
    }
}

@media (max-width: 1200px) {
    html.user-app .category-grid,
    html.user-app .section-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    html.user-app .login-container {
        grid-template-columns: 1fr;
    }

    html.user-app .login-left-panel {
        position: relative;
        height: auto;
        min-height: 220px;
        padding: 32px 20px;
    }

    html.user-app .user-header,
    html.user-app header.user-header.dashboard-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "brand actions"
            "nav nav";
        align-items: center;
        height: auto;
        min-height: 0;
        padding: 10px 12px 8px;
        gap: 8px 10px;
        flex-direction: row;
    }

    html.user-app .user-brand {
        grid-area: brand;
    }

    html.user-app .user-nav {
        grid-area: nav;
        width: 100%;
        justify-content: space-between;
        background: var(--color-muted);
        border-radius: 10px;
        padding: 4px;
        gap: 4px;
    }

    html.user-app .user-nav a {
        flex: 1;
        justify-content: center;
        font-size: 12px;
        gap: 6px;
        padding: 8px 6px;
    }

    html.user-app .user-nav a svg {
        width: 16px;
        height: 16px;
    }

    html.user-app .user-header-actions {
        grid-area: actions;
    }

    html.user-app .user-name {
        display: none;
    }

    html.user-app .dashboard-main {
        padding: 20px 16px 40px;
    }

    html.user-app .agreement-card .card-body,
    html.user-app .register-card .card-body {
        padding: 20px 16px;
    }

    html.user-app .category-grid,
    html.user-app .section-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    html.user-app .dash-card {
        min-height: 0;
        padding: 18px 16px;
    }

    html.user-app .user-brand-mark.has-image img {
        max-width: min(220px, 58vw);
        max-height: 48px;
    }
}

@media (max-width: 768px) {
    html.user-app .dashboard-header,
    html.user-app header.user-header.dashboard-header {
        flex-direction: row;
        align-items: center;
        margin-bottom: 0;
        padding: 10px 12px 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html.user-app *,
    html.user-app *::before,
    html.user-app *::after {
        animation: none !important;
        transition: none !important;
    }
}
