:root {
    --color-primary: #1a2b4c;
    --color-primary-soft: #274069;
    --color-accent: #ff6b35;
    --color-accent-dark: #e85b27;
    --color-highlight: #ffd7c9;
    --color-success: #2d8f62;
    --color-warning: #f3b63f;
    --color-info: #2b7de9;
    --color-text: #172236;
    --color-text-soft: #61718d;
    --color-surface: rgba(255, 255, 255, 0.82);
    --color-surface-strong: #ffffff;
    --color-border: rgba(26, 43, 76, 0.12);
    --shadow-lg: 0 24px 80px rgba(19, 35, 62, 0.14);
    --shadow-md: 0 16px 40px rgba(19, 35, 62, 0.1);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --container: 1180px;
    --transition: 220ms ease;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    color: var(--color-text);
    background:
        radial-gradient(circle at top left, rgba(255, 107, 53, 0.14), transparent 28%),
        radial-gradient(circle at 80% 0%, rgba(39, 64, 105, 0.22), transparent 24%),
        linear-gradient(180deg, #f3f7ff 0%, #f7f4ef 52%, #eef4fa 100%);
    min-height: 100vh;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(calc(100% - 2rem), var(--container));
    margin: 0 auto;
}

.section {
    padding: 5rem 0;
}

.section-accent {
    background: linear-gradient(135deg, rgba(26, 43, 76, 0.96), rgba(39, 64, 105, 0.9));
    color: #fff;
    position: relative;
    overflow: hidden;
}

.section-accent::before,
.section-accent::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    filter: blur(4px);
}

.section-accent::before {
    width: 240px;
    height: 240px;
    top: -80px;
    right: 8%;
}

.section-accent::after {
    width: 180px;
    height: 180px;
    bottom: -40px;
    left: 10%;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 2.4rem;
}

.section-heading h2,
.page-hero h1,
.hero-copy h1,
.cta-banner h2,
.auth-aside h2 {
    margin: 0;
    line-height: 1.08;
}

.section-heading p,
.page-hero p,
.hero-copy p,
.feature-card p,
.timeline-card p,
.faq-card p,
.contact-info p,
.glass-card p {
    color: var(--color-text-soft);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.eyebrow::before {
    content: '';
    width: 2.2rem;
    height: 2px;
    background: currentColor;
}

.glass-card,
.feature-card,
.timeline-card,
.step-preview-card,
.faq-card,
.cta-banner,
.stat-card,
.table-card,
.summary-card,
.info-panel {
    background: var(--color-surface);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-lg);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    border: 0;
    border-radius: 999px;
    padding: 0.95rem 1.5rem;
    font-weight: 700;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    background: linear-gradient(135deg, var(--color-accent), #ff8f57);
    color: #fff;
    box-shadow: 0 16px 30px rgba(255, 107, 53, 0.28);
}

.button-primary:hover {
    background: linear-gradient(135deg, var(--color-accent-dark), #ff7f46);
}

.button-secondary {
    background: rgba(26, 43, 76, 0.08);
    color: var(--color-primary);
}

.button-ghost {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-border);
}

.button-large {
    min-width: 220px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(243, 247, 255, 0.78);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(26, 43, 76, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 84px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--color-primary);
}

.brand span {
    font-size: 1.12rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.site-nav a {
    padding: 0.75rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    color: var(--color-text-soft);
}

.site-nav a.active,
.site-nav a:hover {
    color: var(--color-primary);
    background: rgba(26, 43, 76, 0.06);
}

.site-nav .nav-pill {
    background: var(--color-primary);
    color: #fff;
}

.site-nav .nav-pill:hover {
    background: var(--color-primary-soft);
    color: #fff;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.4rem;
    background: transparent;
    border: 0;
}

.nav-toggle span {
    width: 1.7rem;
    height: 2px;
    background: var(--color-primary);
    border-radius: 999px;
}

/* Homepage */
.hero-section {
    padding: 6rem 0 4rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 2rem;
}

.hero-copy h1 {
    font-size: clamp(2.7rem, 5vw, 4.7rem);
    max-width: 11ch;
}

.hero-subtitle {
    font-size: 1.14rem;
    max-width: 60ch;
    margin: 1.2rem 0 0;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.hero-stats div {
    padding: 1rem 1.1rem;
    background: rgba(255, 255, 255, 0.64);
    border: 1px solid rgba(26, 43, 76, 0.08);
    border-radius: var(--radius-md);
}

.hero-stats strong {
    display: block;
    color: var(--color-primary);
    font-size: 1.25rem;
}

.hero-stats span {
    display: block;
    color: var(--color-text-soft);
    font-size: 0.92rem;
    margin-top: 0.25rem;
}

.hero-visual {
    position: relative;
}

.hero-visual img {
    filter: drop-shadow(0 24px 56px rgba(26, 43, 76, 0.18));
}

.trust-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
    text-align: center;
    color: var(--color-primary);
    font-weight: 700;
}

.trust-strip span {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.65);
    border-radius: 999px;
    border: 1px solid rgba(26, 43, 76, 0.08);
}

.feature-grid,
.step-preview-grid,
.faq-grid,
.timeline-grid,
.dashboard-stats,
.admin-stats,
.service-grid {
    display: grid;
    gap: 1.5rem;
}

.feature-grid,
.step-preview-grid,
.faq-grid,
.dashboard-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-card,
.step-preview-card,
.faq-card,
.timeline-card,
.stat-card,
.table-card,
.info-panel,
.summary-card,
.cta-banner,
.payment-panel {
    padding: 1.8rem;
}

.feature-icon,
.timeline-icon {
    width: 3.3rem;
    height: 3.3rem;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.14), rgba(26, 43, 76, 0.12));
    color: var(--color-primary);
    font-size: 1.25rem;
}

.step-preview-card span,
.timeline-card span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background: rgba(255, 255, 255, 0.12);
    color: var(--color-accent);
    border-radius: 14px;
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-actions {
    margin-top: 2rem;
}

.cta-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.page-hero {
    padding: 4.75rem 0 1rem;
}

.page-hero.compact {
    padding-bottom: 0;
}

.page-hero p {
    max-width: 60ch;
}

/* Forms */
.request-layout,
.contact-grid,
.auth-grid,
.panel-layout {
    display: grid;
    gap: 1.5rem;
}

.request-layout {
    grid-template-columns: 0.85fr 1.15fr;
    align-items: start;
}

.request-intro {
    display: grid;
    gap: 1.5rem;
}

.multi-step-form {
    padding: 1.8rem;
}

.stepper {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stepper-item {
    background: rgba(26, 43, 76, 0.06);
    border: 0;
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: var(--color-text-soft);
}

.stepper-item span {
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(26, 43, 76, 0.08);
    font-size: 0.85rem;
    font-weight: 800;
}

.stepper-item.is-active {
    background: linear-gradient(135deg, rgba(26, 43, 76, 0.96), rgba(39, 64, 105, 0.92));
    color: #fff;
}

.stepper-item.is-active span {
    background: rgba(255, 107, 53, 0.18);
    color: #fff;
}

.form-step {
    display: none;
}

.form-step.is-active {
    display: block;
}

.form-grid {
    display: grid;
    gap: 1rem;
}

.form-grid.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.form-group label {
    font-weight: 600;
    color: var(--color-primary);
}

.form-group input,
.form-group select,
.form-group textarea,
.admin-inline-form select {
    width: 100%;
    border: 1px solid rgba(26, 43, 76, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-text);
    padding: 0.95rem 1rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.admin-inline-form select:focus {
    outline: none;
    border-color: rgba(255, 107, 53, 0.52);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.12);
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: rgba(26, 43, 76, 0.04);
    margin-bottom: 0.8rem;
}

.checkbox-field input {
    width: 1rem;
    height: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.2rem;
}

.form-actions.between {
    justify-content: space-between;
}

.form-note,
.summary-empty {
    color: var(--color-text-soft);
    font-size: 0.94rem;
}

.form-status {
    display: none;
    border-radius: 16px;
    padding: 0.95rem 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.form-status.is-visible {
    display: block;
}

.form-status.is-success {
    background: rgba(45, 143, 98, 0.12);
    color: #0f6a42;
}

.form-status.is-error {
    background: rgba(255, 107, 53, 0.12);
    color: #ac3d14;
}

.feature-list {
    margin: 0;
    padding-left: 1.15rem;
    color: var(--color-text-soft);
}

.feature-list li + li {
    margin-top: 0.7rem;
}

.summary-card dl {
    display: grid;
    gap: 0.85rem;
    margin: 1rem 0 0;
}

.summary-card dt {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-text-soft);
}

.summary-card dd {
    margin: 0.15rem 0 0;
    font-weight: 600;
    color: var(--color-primary);
}

.contact-grid {
    grid-template-columns: 1fr 0.95fr;
}

.contact-info {
    display: grid;
    gap: 1.5rem;
}

.map-card iframe {
    width: 100%;
    min-height: 300px;
    border: 0;
    border-radius: 18px;
}

.auth-grid {
    grid-template-columns: 1fr 0.9fr;
    align-items: start;
}

.auth-grid.single-center {
    grid-template-columns: minmax(0, 720px);
    justify-content: center;
}

.auth-links-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    color: var(--color-text-soft);
}

/* Footer */
.site-footer {
    padding: 4rem 0 1.5rem;
    background: linear-gradient(180deg, rgba(20, 32, 56, 0.98), rgba(11, 18, 35, 1));
    color: rgba(255, 255, 255, 0.82);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.9fr;
    gap: 2rem;
}

.footer-grid h3 {
    color: #fff;
}

.footer-grid a,
.footer-grid span,
.footer-grid p {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.75rem;
}

.brand-footer {
    color: #fff;
    margin-bottom: 1rem;
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-links a {
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.whatsapp-float {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 45;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #2ed06d, #1ba54f);
    color: #fff;
    font-size: 1.8rem;
    box-shadow: 0 18px 32px rgba(27, 165, 79, 0.32);
}

/* Dashboard and admin */
.panel-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
}

.panel-sidebar {
    background: linear-gradient(180deg, rgba(26, 43, 76, 0.98), rgba(14, 25, 46, 0.98));
    color: rgba(255, 255, 255, 0.82);
    padding: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.75rem 1.35rem 1rem;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.panel-sidebar .brand {
    color: #fff;
    margin-bottom: 0;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0.85rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

.nav-group-label {
    padding: 0.9rem 0.5rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.36);
    margin-top: 0.2rem;
}

.sidebar-nav a {
    padding: 0.72rem 0.85rem;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.72);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.93rem;
}

.sidebar-nav a i {
    width: 1.1rem;
    text-align: center;
    opacity: 0.88;
    flex-shrink: 0;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar-nav a.active {
    background: rgba(255, 107, 53, 0.2);
    color: #ffd5c5;
}

.panel-main {
    padding: 2rem;
    min-width: 0;
}

.panel-main .table-card {
    margin-bottom: 2rem;
}

.sidebar-close-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    flex-shrink: 0;
}

.sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.sidebar-overlay {
    display: none;
}

.panel-mobile-bar {
    display: none;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.25rem;
    background: linear-gradient(90deg, rgba(26, 43, 76, 0.98), rgba(14, 25, 46, 0.98));
    position: sticky;
    top: 0;
    z-index: 40;
    margin: -2rem -2rem 1.5rem;
}

.panel-mobile-bar .brand {
    color: #fff;
    flex: 1;
}

.sidebar-open-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 12px;
    font-size: 1.2rem;
    cursor: pointer;
    flex-shrink: 0;
}

.sidebar-open-btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

.button-danger {
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    border: none;
    background: rgba(210, 40, 40, 0.1);
    color: #b71c1c;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
}

.button-danger:hover {
    background: rgba(210, 40, 40, 0.2);
}

.panel-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.panel-topbar h1 {
    margin: 0;
}

.dashboard-stats,
.admin-stats {
    margin-bottom: 1.5rem;
}

.stat-card strong {
    display: block;
    font-size: 2rem;
    color: var(--color-primary);
}

.panel-layout {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: start;
}

.dashboard-table,
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-table th,
.dashboard-table td,
.admin-table th,
.admin-table td {
    padding: 1rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(26, 43, 76, 0.08);
    vertical-align: top;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    background: rgba(26, 43, 76, 0.08);
    color: var(--color-primary);
}

.badge-warning {
    background: rgba(243, 182, 63, 0.18);
    color: #8f6100;
}

.badge-info {
    background: rgba(43, 125, 233, 0.16);
    color: #1352a8;
}

.badge-accent {
    background: rgba(255, 107, 53, 0.16);
    color: #b94315;
}

.badge-primary {
    background: rgba(26, 43, 76, 0.16);
    color: var(--color-primary);
}

.badge-success {
    background: rgba(45, 143, 98, 0.14);
    color: #0f6a42;
}

.admin-inline-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-inline-form button {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 0;
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
}

.dashboard-empty {
    padding: 2rem;
    text-align: center;
    color: var(--color-text-soft);
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.settings-column {
    padding: 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(26, 43, 76, 0.08);
}

.settings-column h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(26, 43, 76, 0.1);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.4rem;
}

.testimonial-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.9rem;
}

.testimonial-head img {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    object-fit: cover;
}

.testimonial-head h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--color-primary);
}

.testimonial-role {
    margin: 0.2rem 0 0;
    color: var(--color-text-soft);
    font-size: 0.88rem;
}

.testimonial-card p {
    margin: 0.45rem 0;
    color: var(--color-text-soft);
}

.testimonial-card blockquote {
    margin: 0.8rem 0 0;
    padding: 0.8rem 0.9rem;
    border-left: 3px solid var(--color-accent);
    background: rgba(255, 107, 53, 0.08);
    border-radius: 10px;
    color: var(--color-primary);
    font-weight: 600;
}

.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 55;
    background: rgba(15, 26, 48, 0.97);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    display: none;
}

.cookie-banner.is-visible {
    display: block;
}

.cookie-banner h3 {
    margin: 0 0 0.5rem;
    color: #fff;
}

.cookie-banner p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
}

.cookie-banner-links {
    margin-top: 0.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-banner-links a {
    color: #ffd7c9;
    text-decoration: underline;
}

.cookie-banner-actions {
    margin-top: 0.9rem;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.button-cookie-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Notices and animation */
.flash-stack {
    padding-top: 1rem;
}

.flash {
    border-radius: 18px;
    padding: 1rem 1.2rem;
    margin-bottom: 0.9rem;
    font-weight: 600;
}

.flash-error {
    background: rgba(255, 107, 53, 0.15);
    color: #a73c12;
}

.flash-success {
    background: rgba(45, 143, 98, 0.15);
    color: #0f6a42;
}

[data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 560ms ease, transform 560ms ease;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1080px) {
    .hero-grid,
    .request-layout,
    .contact-grid,
    .auth-grid,
    .panel-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .feature-grid,
    .step-preview-grid,
    .faq-grid,
    .dashboard-stats,
    .admin-stats,
    .hero-stats,
    .trust-strip,
    .settings-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .panel-shell {
        grid-template-columns: 1fr;
    }

    .panel-sidebar {
        position: fixed;
        left: -290px;
        top: 0;
        bottom: 0;
        width: 280px;
        height: 100%;
        z-index: 100;
        transition: left 0.26s ease;
    }

    .panel-sidebar.is-open {
        left: 0;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 99;
    }

    .sidebar-overlay.is-visible {
        display: block;
    }

    .sidebar-close-btn {
        display: flex;
    }

    .panel-mobile-bar {
        display: flex;
    }
}

@media (max-width: 780px) {
    .section {
        padding: 4rem 0;
    }

    .nav-toggle {
        display: flex;
    }

    .site-nav {
        position: absolute;
        left: 1rem;
        right: 1rem;
        top: calc(100% + 0.75rem);
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        background: rgba(255, 255, 255, 0.95);
        border: 1px solid rgba(26, 43, 76, 0.08);
        border-radius: 24px;
        box-shadow: var(--shadow-md);
    }

    .site-nav.is-open {
        display: flex;
    }

    .hero-copy h1 {
        max-width: none;
    }

    .feature-grid,
    .step-preview-grid,
    .faq-grid,
    .dashboard-stats,
    .admin-stats,
    .hero-stats,
    .trust-strip,
    .testimonials-grid,
    .form-grid.two-columns,
    .stepper,
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .cta-banner,
    .footer-bottom,
    .auth-links-row,
    .panel-topbar,
    .form-actions.between,
    .admin-inline-form {
        flex-direction: column;
        align-items: stretch;
    }

    .button,
    .admin-inline-form button {
        width: 100%;
    }

    .panel-main {
        padding: 1.25rem;
    }
}

/* ================================================================
   ADMIN PANEL — NEW COMPONENT STYLES (Tab system, DataTable, Agents)
   ================================================================ */

/* ---- Admin page header ---- */
.admin-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.admin-page-header h1 { font-size: 1.45rem; font-weight: 700; margin: 0; }
.admin-page-header .header-clock { font-size: 0.85rem; color: var(--text-muted, #7a8ea8); font-variant-numeric: tabular-nums; }
.admin-page-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    width: 100%;
}
.admin-page-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}
.header-time {
    font-size: 0.82rem;
    color: #7a8ea8;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    letter-spacing: .02em;
}
.kpi-icon {
    font-size: 1.25rem;
    margin-bottom: 0.2rem;
    opacity: 0.55;
    display: block;
}

/* ---- KPI strip ---- */
.kpi-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.kpi-card {
    background: #fff;
    border-radius: 14px;
    padding: 1rem 1.1rem 0.85rem;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    border-left: 4px solid #c3cfe2;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    transition: box-shadow .18s;
}
.kpi-card:hover { box-shadow: 0 6px 22px rgba(0,0,0,.1); }
.kpi-card .kpi-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .06em; color: #7a8ea8; }
.kpi-card .kpi-value { font-size: 1.75rem; font-weight: 800; line-height: 1.1; }
.kpi-card .kpi-sub { font-size: 0.72rem; color: #7a8ea8; }
.kpi-warn  { border-left-color: #f59e0b; } .kpi-warn  .kpi-value { color: #d97706; }
.kpi-info  { border-left-color: #3b82f6; } .kpi-info  .kpi-value { color: #2563eb; }
.kpi-success { border-left-color: #10b981; } .kpi-success .kpi-value { color: #059669; }
.kpi-accent  { border-left-color: #8b5cf6; } .kpi-accent  .kpi-value { color: #7c3aed; }

/* ---- Tab navigation ---- */
.admin-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.admin-tabs::-webkit-scrollbar { display: none; }
.tab-btn {
    background: none;
    border: none;
    padding: 0.6rem 1.05rem;
    font-size: 0.83rem;
    font-weight: 600;
    color: #7a8ea8;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    border-radius: 6px 6px 0 0;
    white-space: nowrap;
    transition: color .15s, border-color .15s, background .15s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.tab-btn:hover { color: #1a2b4c; background: #f1f5f9; }
.tab-btn.active { color: #1a2b4c; border-bottom-color: #2563eb; background: #fff; }
.tab-btn i { font-size: 0.78rem; }

/* ---- Tab panels ---- */
.tab-panel { display: none; animation: fadeIn .18s ease; }
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.tab-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.tab-panel-header h2 { font-size: 1.15rem; font-weight: 700; margin: 0 0 0.15rem; }
.tab-panel-sub { font-size: 0.8rem; color: #7a8ea8; margin: 0; }

/* ---- DataTable wrapper ---- */
.dt-wrap { overflow-x: auto; border-radius: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.06); background: #fff; }
.admin-table, .dt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}
.admin-table th, .dt-table th {
    background: #f1f5f9;
    padding: 0.65rem 0.85rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #7a8ea8;
    font-weight: 700;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
    user-select: none;
}
.admin-table td, .dt-table td {
    padding: 0.7rem 0.85rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}
.admin-table tbody tr:last-child td, .dt-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td, .dt-table tbody tr:hover td { background: #f8fafc; }
th.sortable { cursor: pointer; }
th.sortable:hover { color: #1a2b4c; }
th.sortable i { opacity: .4; font-size: .65rem; }
th.sortable.asc i, th.sortable.desc i { opacity: 1; color: #2563eb; }

.table-controls { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.table-search {
    border: 1px solid #d1d9e6;
    border-radius: 8px;
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
    outline: none;
    width: 190px;
    transition: border-color .15s;
}
.table-search:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }

.dt-pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    padding: 0.6rem 0.85rem;
    border-top: 1px solid #f1f5f9;
}
.dt-pagination button {
    background: none;
    border: 1px solid #d1d9e6;
    padding: 0.28rem 0.65rem;
    border-radius: 6px;
    font-size: 0.78rem;
    cursor: pointer;
    color: #475569;
    font-weight: 500;
    transition: background .12s, color .12s;
}
.dt-pagination button:hover:not(:disabled) { background: #f1f5f9; color: #1a2b4c; }
.dt-pagination button.active { background: #2563eb; color: #fff; border-color: #2563eb; }
.dt-pagination button:disabled { opacity: .35; cursor: default; }
.dt-page-info { font-size: 0.75rem; color: #7a8ea8; margin-right: 6px; }

/* ---- Cell helpers ---- */
.cell-sub { font-size: 0.74rem; color: #7a8ea8; margin-top: 2px; }
.cell-date { font-size: 0.74rem; color: #94a3b8; font-variant-numeric: tabular-nums; }
.actions-cell { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ---- Buttons ---- */
.btn-icon-only {
    background: #f1f5f9;
    border: 1px solid #d1d9e6;
    padding: 0.3rem 0.65rem;
    border-radius: 7px;
    cursor: pointer;
    color: #374151;
    font-size: 0.8rem;
    font-weight: 500;
    transition: background .12s, color .12s, border-color .12s;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}
.btn-icon-only i { font-size: 0.8rem; flex-shrink: 0; }
.btn-icon-only:hover { background: #e2e8f0; color: #111827; border-color: #94a3b8; }
.btn-icon-only.btn-danger { color: #dc2626; border-color: #fca5a5; }
.btn-icon-only.btn-danger:hover { background: #fee2e2; border-color: #ef4444; color: #991b1b; }
.btn-tag {
    display: inline-block;
    padding: 0.22rem 0.7rem;
    border-radius: 20px;
    font-size: 0.73rem;
    font-weight: 600;
    border: 1px solid #d1d9e6;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
    transition: background .12s, color .12s;
}
.btn-tag:hover { background: #e0e7ef; color: #1a2b4c; }
.btn-tag.btn-tag-danger { color: #dc2626; border-color: #fca5a5; }
.btn-tag.btn-tag-danger:hover { background: #fee2e2; }
.button-sm { padding: 0.35rem 0.8rem; font-size: 0.8rem; }
.button-secondary { background: #f1f5f9; color: #1a2b4c; border: 1px solid #d1d9e6; }
.button-secondary:hover { background: #e0e7ef; }

/* ---- Badges ---- */
.badge {
    display: inline-block;
    padding: 0.18rem 0.6rem;
    border-radius: 20px;
    font-size: 0.71rem;
    font-weight: 700;
    letter-spacing: .03em;
    background: #e2e8f0;
    color: #475569;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-info    { background: #dbeafe; color: #1e40af; }
.badge-warn    { background: #fef3c7; color: #92400e; }
.badge-accent  { background: #ede9fe; color: #5b21b6; }
.badge-danger  { background: #fee2e2; color: #991b1b; }

/* Status priorities */
.prio-urgent { background: #fee2e2; color: #991b1b; }
.prio-high   { background: #fef3c7; color: #92400e; }
.prio-normal { background: #dbeafe; color: #1e40af; }
.prio-low    { background: #f1f5f9; color: #475569; }

/* Workflow status badges */
.wf-badge-queued     { background: #f1f5f9; color: #475569; }
.wf-badge-planning   { background: #dbeafe; color: #1e40af; }
.wf-badge-in_progress { background: #fef3c7; color: #92400e; }
.wf-badge-blocked    { background: #fee2e2; color: #991b1b; }
.wf-badge-review     { background: #ede9fe; color: #5b21b6; }
.wf-badge-completed  { background: #d1fae5; color: #065f46; }
.wf-badge-failed     { background: #fee2e2; color: #7f1d1d; }
.wf-badge-cancelled  { background: #f1f5f9; color: #94a3b8; }

/* ---- Progress bar ---- */
.progress-bar-wrap { background: #e2e8f0; border-radius: 99px; height: 6px; width: 100px; overflow: hidden; margin-bottom: 3px; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg,#2563eb,#7c3aed); border-radius: 99px; transition: width .3s; }

/* ---- Agent cards ---- */
.agent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1rem;
}
.agent-card {
    background: #fff;
    border-radius: 14px;
    padding: 1rem 1.1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,.07);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: box-shadow .18s;
}
.agent-card:hover { box-shadow: 0 6px 22px rgba(0,0,0,.1); }
.agent-card-head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.92rem;
}
.agent-card-head strong { flex: 1; }
.agent-hb-dot {
    width: 10px; height: 10px; border-radius: 50%;
    flex-shrink: 0;
    background: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148,163,184,.25);
}
.hb-online  { background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.25); animation: hb-pulse 2s infinite; }
.hb-idle    { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.25); }
.hb-stale   { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.2); }
.hb-offline { background: #94a3b8; }
.hb-never   { background: #cbd5e1; }
@keyframes hb-pulse { 0%,100% { box-shadow: 0 0 0 3px rgba(16,185,129,.25); } 50% { box-shadow: 0 0 0 6px rgba(16,185,129,.08); } }

.agent-card-meta { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.65rem; font-size: 0.78rem; margin: 0; }
.agent-card-meta dt { color: #7a8ea8; font-weight: 600; white-space: nowrap; padding-top: 1px; }
.agent-card-meta dd { margin: 0; color: #1e293b; word-break: break-all; }

.agent-card-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 0.25rem; }

/* ---- Workflow bar chart ---- */
.workflow-status-chart { display: flex; flex-direction: column; gap: 0.45rem; }
.wf-bar-row { display: flex; align-items: center; gap: 0.6rem; font-size: 0.78rem; }
.wf-bar-label { width: 80px; color: #475569; font-weight: 500; text-align: right; flex-shrink: 0; }
.wf-bar-track { flex: 1; background: #e2e8f0; border-radius: 99px; height: 8px; overflow: hidden; }
.wf-bar { height: 100%; border-radius: 99px; min-width: 2px; transition: width .4s ease; }
.wf-bar-count { width: 28px; text-align: right; font-variant-numeric: tabular-nums; color: #7a8ea8; }
.wf-bar-queued     { background: #94a3b8; }
.wf-bar-planning   { background: #3b82f6; }
.wf-bar-in_progress { background: #f59e0b; }
.wf-bar-blocked    { background: #ef4444; }
.wf-bar-review     { background: #8b5cf6; }
.wf-bar-completed  { background: #10b981; }
.wf-bar-failed     { background: #dc2626; }
.wf-bar-cancelled  { background: #cbd5e1; }

/* ---- Panel cards ---- */
.panel-card {
    background: #fff;
    border-radius: 14px;
    padding: 1.15rem 1.25rem;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    border: 1px solid #e2e8f0;
}
.panel-card-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1a2b4c;
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.panel-card-title i { color: #2563eb; }

/* ---- Two-column layout ---- */
.two-col-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
@media (max-width: 900px) { .two-col-layout { grid-template-columns: 1fr; } }

/* ---- Settings grid ---- */
.settings-tab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

/* ---- Forms inside panel ---- */
.form-group { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.85rem; }
.form-group label { font-size: 0.77rem; font-weight: 600; color: #475569; }
.form-group input, .form-group textarea, .form-group select {
    border: 1px solid #d1d9e6;
    border-radius: 8px;
    padding: 0.45rem 0.75rem;
    font-size: 0.84rem;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    background: #fafbfc;
    color: #1e293b;
    width: 100%;
    box-sizing: border-box;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
    background: #fff;
}
.form-note { font-size: 0.73rem; color: #94a3b8; margin: 2px 0; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.checkbox-field { display: flex; align-items: center; gap: 0.5rem; font-size: 0.83rem; cursor: pointer; margin-bottom: 0.7rem; }
.checkbox-field input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; accent-color: #2563eb; }
.settings-divider { border: none; border-top: 1px solid #e2e8f0; margin: 0.85rem 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 0.75rem; }
.form-actions-sticky {
    position: sticky;
    bottom: 0;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(8px);
    padding: 0.75rem 0;
    border-top: 1px solid #e2e8f0;
    z-index: 10;
    margin-top: 0.5rem;
}

/* ---- Admin inline form ---- */
.admin-inline-form { display: inline-flex; align-items: center; gap: 6px; }
.admin-inline-form select { padding: 0.28rem 0.55rem; font-size: 0.78rem; border-radius: 7px; }
.select-status { max-width: 160px; }

/* ---- Empty state ---- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1rem;
    color: #94a3b8;
    gap: 0.65rem;
}
.empty-state i { font-size: 2rem; }
.empty-state p { font-size: 0.88rem; margin: 0; }

/* ---- API info box ---- */
.api-info-box {
    padding: 0.85rem 1rem;
    background: rgba(37,99,235,.05);
    border-radius: 10px;
    border-left: 3px solid #2563eb;
}
.api-info-box code { font-size: 0.77rem; background: #e0e7ef; padding: 1px 5px; border-radius: 4px; }

/* ---- Misc ---- */
.mt-4  { margin-top: 0.25rem; }
.mt-8  { margin-top: 0.5rem; }
.mt-12 { margin-top: 0.75rem; }
.mt-16 { margin-top: 1rem; }

/* ---- Responsive tweaks for new components ---- */
@media (max-width: 700px) {
    .kpi-strip { grid-template-columns: repeat(2, 1fr); }
    .agent-grid { grid-template-columns: 1fr; }
    .settings-tab-grid { grid-template-columns: 1fr; }
    .form-row-2 { grid-template-columns: 1fr; }
    .tab-btn { padding: 0.5rem 0.7rem; font-size: 0.78rem; }
}

/* =============================================
   COPILOT AI TAB
   ============================================= */

.copilot-layout { align-items: start; }

/* Status dot in tab header */
.copilot-status-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #9ca3af;
    display: inline-block;
    flex-shrink: 0;
    transition: background 0.3s;
}
.copilot-status-dot.dot-ok   { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
.copilot-status-dot.dot-err  { background: #ef4444; }
.copilot-status-dot.dot-busy { background: #f59e0b; }

/* Model badge */
.copilot-model-badge {
    display: inline-flex; align-items: center; gap: 0.35rem;
    background: #f0f4ff; color: #4f46e5;
    border: 1px solid #c7d2fe;
    padding: 0.3rem 0.75rem; border-radius: 9999px;
    font-size: 0.78rem; font-weight: 600;
}

/* Model selector row */
.copilot-model-row {
    display: flex; align-items: center; gap: 0.75rem;
    flex-wrap: wrap; margin-bottom: 0.75rem;
    font-size: 0.85rem; color: #6b7280;
}
.copilot-model-sel {
    padding: 0.3rem 0.6rem; border: 1px solid #e5e7eb;
    border-radius: 6px; font-size: 0.82rem; background: #fff;
}

/* Chat card */
.copilot-chat-card { display: flex; flex-direction: column; }

/* Messages container */
.copilot-messages {
    flex: 1;
    min-height: 280px; max-height: 420px;
    overflow-y: auto;
    display: flex; flex-direction: column; gap: 0.9rem;
    padding: 0.5rem 0; margin-bottom: 0.75rem;
    scrollbar-width: thin;
}

/* Individual messages */
.copilot-msg {
    display: flex; gap: 0.65rem; align-items: flex-start;
}
.copilot-msg-user { flex-direction: row-reverse; }
.copilot-msg-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 0.9rem;
    background: #e0e7ff; color: #4f46e5;
}
.copilot-msg-user .copilot-msg-avatar {
    background: #d1fae5; color: #059669;
}
.copilot-msg-content {
    background: #f3f4f6; color: #111827;
    padding: 0.65rem 0.9rem;
    border-radius: 0 12px 12px 12px;
    font-size: 0.87rem; line-height: 1.5;
    max-width: calc(100% - 44px);
    white-space: pre-wrap; word-break: break-word;
}
.copilot-msg-user .copilot-msg-content {
    background: #4f46e5; color: #fff;
    border-radius: 12px 0 12px 12px;
}

/* Typing indicator */
.copilot-typing .copilot-msg-content {
    background: #f3f4f6; padding: 0.65rem 1rem;
    display: flex; gap: 5px; align-items: center;
}
.copilot-typing .copilot-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #9ca3af; animation: copilot-bounce 1.2s infinite;
}
.copilot-typing .copilot-dot:nth-child(2) { animation-delay: 0.2s; }
.copilot-typing .copilot-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes copilot-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}

/* Chat form */
.copilot-chat-form { display: flex; flex-direction: column; gap: 0.5rem; }
.copilot-chat-input {
    width: 100%; padding: 0.65rem 0.85rem;
    border: 1px solid #e5e7eb; border-radius: 8px;
    font-size: 0.88rem; resize: none; font-family: inherit;
    transition: border-color 0.2s;
}
.copilot-chat-input:focus { outline: none; border-color: #4f46e5; }
.copilot-chat-actions { display: flex; gap: 0.5rem; justify-content: flex-end; }

/* Action buttons grid */
.copilot-actions-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 0.5rem; margin-top: 0.75rem;
}
.copilot-action-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Output card */
.copilot-output-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 0.5rem;
}
.copilot-output-box {
    background: #f8f9fa; border: 1px solid #e5e7eb;
    border-radius: 8px; padding: 0.9rem;
    font-size: 0.83rem; line-height: 1.6;
    max-height: 360px; overflow-y: auto;
    white-space: pre-wrap; word-break: break-word;
    color: #1f2937;
}
.copilot-output-box code {
    background: #e8eaf2; padding: 0.15em 0.35em;
    border-radius: 4px; font-size: 0.82em;
}

/* Input with button (settings PAT) */
.input-with-btn {
    display: flex; gap: 0.4rem; align-items: stretch;
}
.input-with-btn input { flex: 1; }

@media (max-width: 700px) {
    .copilot-actions-grid { grid-template-columns: 1fr; }
    .copilot-messages { max-height: 280px; }
}

/* =============================================
   GITHUB OAUTH BUTTON
   ============================================= */

.btn-github {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    background: #24292f;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-decoration: none;
    margin-top: 0.25rem;
}
.btn-github:hover  { background: #1a1f24; color: #fff; }
.btn-github:active { transform: scale(.98); }
.btn-github svg    { flex-shrink: 0; }

/* Auth divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0 0.5rem;
    color: #9ca3af;
    font-size: 0.82rem;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

/* =============================================
   AI ENHANCE BUTTON (richiedi.php)
   ============================================= */

.ai-enhance-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.btn-ai-enhance {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    white-space: nowrap;
}
.btn-ai-enhance:hover:not(:disabled) { opacity: 0.88; }
.btn-ai-enhance:active:not(:disabled) { transform: scale(.98); }
.btn-ai-enhance:disabled { opacity: 0.55; cursor: not-allowed; }

.ai-enhance-status {
    font-size: 0.82rem;
    color: #6b7280;
}
.ai-enhance-status.is-success { color: #059669; }
.ai-enhance-status.is-error   { color: #dc2626; }

/* =============================================
   PAT GUIDE (admin settings)
   ============================================= */

.pat-guide {
    background: #f8faff;
    border: 1px solid #c7d2fe;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.pat-guide-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    color: #4338ca;
    user-select: none;
    gap: 0.5rem;
}
.pat-guide-header:hover { background: #eff2ff; }

.pat-guide-chevron {
    transition: transform 0.25s;
    font-size: 0.75rem;
    flex-shrink: 0;
}
.pat-guide-chevron.open { transform: rotate(180deg); }

.pat-guide-steps {
    display: none;
    margin: 0;
    padding: 0.25rem 1.25rem 0.75rem 2.5rem;
    list-style: decimal;
}
.pat-guide-steps.open { display: block; }

.pat-guide-steps li {
    padding: 0.45rem 0;
    font-size: 0.85rem;
    line-height: 1.55;
    color: #374151;
    border-bottom: 1px solid #e8ecff;
}
.pat-guide-steps li:last-child { border-bottom: none; }

.pat-guide-btn {
    margin-top: 0.4rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.pat-guide-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: #eff6ff;
    border-top: 1px solid #bfdbfe;
    font-size: 0.8rem;
    color: #1d4ed8;
}
.pat-guide-note i { flex-shrink: 0; margin-top: 2px; }

.pat-configured { color: #059669 !important; }

.pat-test-row { align-items: center; }
.pat-test-result {
    font-size: 0.83rem;
    font-weight: 500;
}
.pat-test-result.ok  { color: #059669; }
.pat-test-result.err { color: #dc2626; }

/* =============================================
   REQUEST ASSIGNMENTS
   ============================================= */

.assignment-form {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.assignment-select {
    min-width: 150px;
}

.assignment-current {
    min-width: 180px;
}

.assignment-reason {
    margin-top: 0.3rem;
    font-size: 0.76rem;
    color: #6366f1;
    line-height: 1.4;
}

.assignment-staff-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.form-row-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.staff-chip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.staff-chip {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.8rem 0.9rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.staff-chip strong {
    color: #111827;
    font-size: 0.9rem;
}

.staff-chip span {
    color: #6b7280;
    font-size: 0.8rem;
    line-height: 1.4;
}

@media (max-width: 900px) {
    .form-row-3 {
        grid-template-columns: 1fr;
    }
}
