:root {
    --rb-bg: #eef4fb;
    --rb-surface: #ffffff;
    --rb-surface-soft: #f7fbff;
    --rb-primary: #163452;
    --rb-secondary: #c9a046;
    --rb-text: #17324a;
    --rb-text-muted: #66788b;
    --rb-border: #d7e1eb;
    --rb-danger: #b02a37;
    --rb-success: #157347;
    --rb-shadow: 0 18px 40px rgba(16, 39, 68, 0.10);
}

.rb-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(201, 160, 70, 0.12), transparent 22%),
        linear-gradient(180deg, #f8fbff 0%, var(--rb-bg) 100%);
    color: var(--rb-text);
}

.rb-page .site-navbar {
    background: rgba(16, 39, 68, 0.96);
}

.rb-shell {
    max-width: 1180px;
    padding-top: 150px;
    padding-bottom: 72px;
}

.rb-hero-card,
.rb-form-card,
.rb-side-card,
.rb-builder-card {
    background: var(--rb-surface);
    border: 1px solid var(--rb-border);
    border-radius: 24px;
    box-shadow: var(--rb-shadow);
}

.rb-hero-card {
    overflow: hidden;
    position: relative;
    background:
        linear-gradient(135deg, rgba(22, 52, 82, 0.98), rgba(22, 52, 82, 0.9)),
        linear-gradient(135deg, #163452, #28537b);
    color: #ffffff;
}

.rb-hero-card::after {
    content: "";
    position: absolute;
    width: 240px;
    height: 240px;
    right: -70px;
    bottom: -70px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(201, 160, 70, 0.35), transparent 68%);
}

.rb-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    font-weight: 700;
}

.rb-hero-title {
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 800;
    line-height: 1.06;
    margin-bottom: 14px;
}

.rb-hero-copy {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
}

.rb-feature-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.rb-feature-item {
    border-radius: 18px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.1);
}

.rb-feature-item strong {
    display: block;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.rb-feature-item span {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
}

.rb-form-card .card-body,
.rb-builder-card .card-body,
.rb-side-card .card-body {
    padding: 28px;
}

.rb-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.rb-section-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--rb-primary);
}

.rb-section-copy {
    margin: 4px 0 0;
    color: var(--rb-text-muted);
    line-height: 1.7;
}

.rb-label {
    font-weight: 700;
    color: var(--rb-primary);
    margin-bottom: 8px;
}

.rb-input,
.rb-select,
.rb-textarea {
    border-radius: 16px;
    border: 1px solid var(--rb-border);
    padding: 13px 15px;
    background: #ffffff;
}

.rb-input:focus,
.rb-select:focus,
.rb-textarea:focus {
    border-color: rgba(22, 52, 82, 0.42);
    box-shadow: 0 0 0 0.2rem rgba(22, 52, 82, 0.10);
}

.rb-textarea {
    min-height: 132px;
}

.rb-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.rb-btn-primary,
.rb-btn-secondary,
.rb-btn-outline,
.rb-btn-danger {
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 700;
}

.rb-btn-primary {
    background: linear-gradient(135deg, var(--rb-primary) 0%, #244d77 100%);
    color: #ffffff;
    border: none;
}

.rb-btn-primary:hover,
.rb-btn-primary:focus {
    color: #ffffff;
    filter: brightness(1.04);
}

.rb-btn-secondary {
    background: linear-gradient(135deg, var(--rb-secondary) 0%, #dfb45a 100%);
    color: #163452;
    border: none;
}

.rb-btn-outline {
    background: #ffffff;
    border: 1px solid var(--rb-border);
    color: var(--rb-primary);
}

.rb-btn-danger {
    background: rgba(176, 42, 55, 0.08);
    border: 1px solid rgba(176, 42, 55, 0.16);
    color: var(--rb-danger);
}

.rb-builder-card + .rb-builder-card {
    margin-top: 24px;
}

.rb-collection {
    display: grid;
    gap: 16px;
}

.rb-item-card {
    border: 1px dashed rgba(22, 52, 82, 0.18);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    padding: 18px;
}

.rb-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.rb-item-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--rb-primary);
    margin: 0;
}

.rb-item-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px;
}

.rb-span-12 { grid-column: span 12; }
.rb-span-8 { grid-column: span 8; }
.rb-span-6 { grid-column: span 6; }
.rb-span-4 { grid-column: span 4; }
.rb-span-3 { grid-column: span 3; }

.rb-check-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-top: 8px;
}

.rb-help-list {
    display: grid;
    gap: 14px;
}

.rb-help-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.rb-help-icon {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(22, 52, 82, 0.08);
    color: var(--rb-primary);
    flex-shrink: 0;
}

.rb-help-item strong {
    display: block;
    color: var(--rb-primary);
    margin-bottom: 3px;
}

.rb-help-item span {
    color: var(--rb-text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

.rb-history-list {
    display: grid;
    gap: 12px;
}

.rb-history-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--rb-border);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.rb-history-item:hover,
.rb-history-item:focus {
    transform: translateY(-1px);
    border-color: rgba(22, 52, 82, 0.24);
    box-shadow: 0 10px 22px rgba(16, 39, 68, 0.08);
}

.rb-history-main {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.rb-history-title {
    color: var(--rb-primary);
    font-size: 0.95rem;
}

.rb-history-meta {
    color: var(--rb-text-muted);
    font-size: 0.86rem;
    line-height: 1.5;
}

.rb-history-status {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.rb-history-status.is-generated {
    background: rgba(22, 52, 82, 0.08);
    color: var(--rb-primary);
}

.rb-history-status.is-edited {
    background: rgba(201, 160, 70, 0.14);
    color: #8f6914;
}

.rb-history-empty {
    border-radius: 18px;
    border: 1px dashed rgba(22, 52, 82, 0.18);
    background: #fbfdff;
    color: var(--rb-text-muted);
    padding: 16px;
    line-height: 1.6;
}

.rb-upload-shell {
    display: flex;
    gap: 18px;
    align-items: center;
}

.rb-upload-preview {
    width: 108px;
    height: 108px;
    border-radius: 24px;
    border: 1px dashed rgba(22, 52, 82, 0.18);
    background: linear-gradient(180deg, #ffffff 0%, #f4f8fb 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.rb-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rb-upload-placeholder {
    color: var(--rb-text-muted);
    text-align: center;
    font-size: 0.86rem;
    line-height: 1.5;
    padding: 12px;
}

.rb-form-alert {
    border-radius: 18px;
    padding: 14px 18px;
    margin-bottom: 18px;
}

.rb-alert-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.rb-alert-list {
    margin: 0;
    padding-left: 18px;
    line-height: 1.7;
}

.rb-alert-list li + li {
    margin-top: 4px;
}

.rb-form-alert.is-success {
    background: rgba(21, 115, 71, 0.10);
    border: 1px solid rgba(21, 115, 71, 0.14);
    color: var(--rb-success);
}

.rb-form-alert.is-danger {
    background: rgba(176, 42, 55, 0.08);
    border: 1px solid rgba(176, 42, 55, 0.16);
    color: var(--rb-danger);
}

.rb-photo-cropper {
    margin-top: 16px;
}

.rb-photo-crop-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 168px;
    gap: 18px;
    align-items: start;
}

.rb-photo-cropper .poster-cropper-stage {
    max-width: 320px;
    aspect-ratio: 1 / 1;
}

.rb-photo-crop-preview-wrap {
    display: grid;
    gap: 10px;
}

.rb-photo-crop-preview {
    width: 148px;
    height: 148px;
    border-radius: 24px;
    border: 1px solid rgba(22, 52, 82, 0.12);
    background: linear-gradient(180deg, #ffffff 0%, #f4f8fb 100%);
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rb-photo-crop-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rb-loading-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(16, 39, 68, 0.48);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 12000;
    padding: 20px;
}

.rb-loading-backdrop.is-visible {
    display: flex;
}

.rb-loading-card {
    width: min(460px, 100%);
    border-radius: 24px;
    background: #ffffff;
    padding: 28px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.rb-loading-card .spinner-border {
    width: 3rem;
    height: 3rem;
}

.rb-preview-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
}

.rb-sticky-card {
    position: sticky;
    top: 136px;
}

.rb-preview-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.rb-preview-title-input {
    min-width: min(420px, 100%);
    border-radius: 16px;
    border: 1px solid var(--rb-border);
    padding: 12px 14px;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--rb-primary);
}

.rb-preview-note {
    color: var(--rb-text-muted);
    line-height: 1.7;
}

.rb-resume-frame {
    background: linear-gradient(180deg, #fdfefe 0%, #f4f8fc 100%);
    border-radius: 24px;
    border: 1px solid var(--rb-border);
    padding: 22px;
}

.rb-resume-document {
    background: #ffffff;
    border: 1px solid var(--rb-border);
    border-radius: 18px;
    padding: 32px;
    box-shadow: 0 18px 36px rgba(16, 39, 68, 0.08);
}

.rb-resume-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    padding-bottom: 18px;
    margin-bottom: 22px;
    border-bottom: 2px solid var(--rb-primary);
}

.rb-resume-name {
    margin: 0 0 8px;
    font-size: 2rem;
    letter-spacing: 0.03em;
    font-weight: 800;
    text-transform: uppercase;
}

.rb-resume-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--rb-text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
}

.rb-resume-contact a,
.rb-entry-link {
    color: var(--rb-primary);
    text-decoration: none;
}

.rb-separator {
    color: #91a1b3;
}

.rb-resume-photo-wrap {
    flex-shrink: 0;
}

.rb-resume-photo {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--rb-border);
}

.rb-resume-section {
    margin-bottom: 22px;
}

.rb-resume-section-title {
    margin: 0 0 12px;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rb-primary);
    border-bottom: 1px solid var(--rb-border);
    padding-bottom: 6px;
    font-weight: 800;
}

.rb-resume-paragraph,
.rb-bullet-list,
.rb-entry-subtitle,
.rb-entry-period {
    font-size: 0.95rem;
    line-height: 1.7;
}

.rb-entry {
    margin-bottom: 16px;
}

.rb-entry-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 8px;
}

.rb-entry-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
}

.rb-entry-subtitle,
.rb-entry-period {
    color: var(--rb-text-muted);
}

.rb-bullet-list {
    margin: 0;
    padding-left: 20px;
}

.rb-bullet-list li {
    margin-bottom: 6px;
}

.rb-skill-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rb-skill-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--rb-border);
    background: #f7fafc;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--rb-primary);
}

.rb-editable {
    outline: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.rb-editable:focus {
    background: rgba(22, 52, 82, 0.04);
    box-shadow: 0 0 0 2px rgba(22, 52, 82, 0.12);
    border-radius: 8px;
}

.rb-tip-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding-left: 18px;
    color: var(--rb-text-muted);
    line-height: 1.7;
}

@media (max-width: 991.98px) {
    .rb-feature-list,
    .rb-preview-layout {
        grid-template-columns: 1fr;
    }

    .rb-sticky-card {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .rb-shell {
        padding-top: 126px;
    }

    .rb-feature-list {
        gap: 12px;
    }

    .rb-item-grid {
        grid-template-columns: 1fr;
    }

    .rb-span-12,
    .rb-span-8,
    .rb-span-6,
    .rb-span-4,
    .rb-span-3 {
        grid-column: span 1;
    }

    .rb-upload-shell,
    .rb-resume-header,
    .rb-entry-head,
    .rb-history-item {
        flex-direction: column;
    }

    .rb-photo-crop-grid {
        grid-template-columns: 1fr;
    }

    .rb-photo-crop-preview {
        width: 132px;
        height: 132px;
    }

    .rb-form-card .card-body,
    .rb-builder-card .card-body,
    .rb-side-card .card-body {
        padding: 22px;
    }

    .rb-resume-document {
        padding: 22px;
    }
}
