/* ─── Base ─────────────────────────────────────────────────── */
:root {
    --gold:        #C9A84C;
    --gold-light:  #E8C97A;
    --gold-dark:   #9E7A2B;
    --navy:        #1A2340;
    --navy-light:  #253059;
    --text-main:   #2C3553;
    --text-muted:  #7B8399;
    --bg:          #F3F4F8;
    --card-bg:     #FFFFFF;
    --border:      #E2E5F0;
    --radius:      12px;
    --shadow-sm:   0 2px 8px rgba(26, 35, 64, .08);
    --shadow-md:   0 6px 24px rgba(26, 35, 64, .12);
}

[v-cloak] { display: none; }

*, *::before, *::after { box-sizing: border-box; }

body {
    background: var(--bg);
    font-family: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
    color: var(--text-main);
    min-height: 100vh;
    background-image: radial-gradient(ellipse 80% 40% at 50% -10%, rgba(201,168,76,.12) 0%, transparent 70%);
}

/* ─── Navbar ────────────────────────────────────────────────── */
.site-navbar {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    padding: 0.75rem 0;
    box-shadow: 0 2px 16px rgba(26, 35, 64, .3);
    border-bottom: 2px solid var(--gold-dark);
    justify-content: flex-start;
}

.site-navbar > .container {
    justify-content: flex-start;
}

.navbar-logo {
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

.navbar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.navbar-subtitle {
    display: block;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--gold-light);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ─── Navbar nav links ──────────────────────────────────────── */
.site-navbar .navbar-nav .nav-item + .nav-item {
    margin-left: 0.5rem;
}

.site-navbar .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.4rem 0.9rem;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
    letter-spacing: 0.5px;
}

.site-navbar .navbar-nav .nav-link:hover,
.site-navbar .navbar-nav .nav-link.active {
    color: var(--gold-light);
    background: rgba(255, 255, 255, 0.08);
}

/* ─── Page card ─────────────────────────────────────────────── */
.page-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.page-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold-light), var(--gold-dark));
}

/* ─── Form headings ─────────────────────────────────────────── */
.form-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.form-heading-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-light);
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(26, 35, 64, .25);
}

.form-heading h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--navy);
}

.form-subheading {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 2rem;
    padding-left: 0.2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
}

/* ─── Form section label ────────────────────────────────────── */
.form-section-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--gold-dark);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.form-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border), transparent);
}

/* ─── Bootstrap form overrides ──────────────────────────────── */
.form-control,
.custom-select {
    border-color: var(--border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.9rem;
    padding: 0.5rem 0.85rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #FAFBFD;
}

.form-control:focus,
.custom-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, .18);
    background-color: #fff;
}

.form-control::placeholder { color: #B0B8CC; }

textarea.form-control { line-height: 1.65; }

/* ─── Labels ────────────────────────────────────────────────── */
.col-form-label,
legend.col-form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    padding-bottom: 0.3rem;
}

/* ─── Buttons ───────────────────────────────────────────────── */
.btn-primary {
    background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 8px;
    padding: 0.5rem 1.6rem;
    box-shadow: 0 3px 10px rgba(158, 122, 43, .35);
    transition: filter 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn-primary:hover:not(:disabled) {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(158, 122, 43, .45);
    color: #fff;
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    filter: brightness(0.96);
}

.btn-primary:disabled,
.btn-primary.disabled {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    opacity: 0.6;
}

.btn-secondary {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-muted);
    font-weight: 500;
    border-radius: 8px;
    padding: 0.5rem 1.3rem;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.btn-secondary:hover:not(:disabled) {
    border-color: #adb5bd;
    color: var(--text-main);
    background: #F3F4F8;
}

.btn-outline-secondary {
    border-color: var(--gold);
    color: var(--gold-dark);
    font-size: 0.85rem;
    border-radius: 7px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.btn-outline-secondary:hover:not(:disabled) {
    background: var(--gold);
    color: #fff;
    border-color: var(--gold);
}

/* ─── Alerts ────────────────────────────────────────────────── */
.alert {
    border-radius: 8px;
    font-size: 0.875rem;
    border: none;
    border-left: 4px solid;
}

.alert-danger  { border-left-color: #dc3545; background: #FFF5F5; color: #7B1A1A; }
.alert-info    { border-left-color: var(--gold); background: #FFFBF0; color: #7A5200; }
.alert-success { border-left-color: #28a745; background: #F0FFF4; color: #155724; }

/* ─── File upload list ──────────────────────────────────────── */
.file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #FAFBFD;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.file-item:hover {
    border-color: var(--gold);
    box-shadow: 0 2px 8px rgba(201, 168, 76, .1);
}

.file-thumb {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
}

.file-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-ext {
    font-size: 9px;
    font-weight: 700;
    color: var(--gold-light);
    letter-spacing: 0.5px;
}

.file-meta {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-main);
}

.file-size {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
}

.file-remove {
    border: none;
    background: none;
    color: #C5CAD8;
    font-size: 18px;
    line-height: 1;
    padding: 4px 7px;
    cursor: pointer;
    flex-shrink: 0;
    border-radius: 50%;
    transition: background 0.15s, color 0.15s;
}

.file-remove:hover:not(:disabled) {
    background: #FFF0F0;
    color: #dc3545;
}

.file-remove:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ─── Progress bar ──────────────────────────────────────────── */
.progress { border-radius: 100px; background: var(--border); }

/* ─── Form action row ───────────────────────────────────────── */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
}

/* ─── Success page ──────────────────────────────────────────── */
.success-card {
    text-align: center;
    padding: 3.5rem 2rem;
}

.success-icon-wrap {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e6f9ee, #c6efdb);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.75rem;
    box-shadow: 0 4px 20px rgba(40, 167, 69, .2);
}

.success-icon-wrap i {
    font-size: 2.5rem;
    color: #1a9641;
}

.success-card h4 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.75rem;
}

.success-card .success-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.75;
    margin-bottom: 2rem;
}

/* ─── Required asterisk ─────────────────────────────────────── */
.text-danger { color: #C9573A !important; }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .page-card { padding: 1.5rem 1.25rem; }
    main.container { padding-bottom: 80px; }
}

/* ─── Dev badge ─────────────────────────────────────────────── */
#dev-badge {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 9999;
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
    pointer-events: none;
    letter-spacing: 0.5px;
}
