﻿:root {
    --brand-primary: #667eea;
    --brand-secondary: #5a67d8;
    --brand-accent: #f093fb;
    --brand-gold: #ffd89b;
    --brand-emerald: #10b981;
    --brand-rose: #f43f5e;
    --surface: #ffffff;
    --surface-muted: rgba(255, 255, 255, 0.95);
    --surface-glass: rgba(255, 255, 255, 0.25);
    --text-main: #2d3748;
    --text-muted: #718096;
    --border-soft: rgba(102, 126, 234, 0.15);
    --shadow-soft: 0 20px 60px -10px rgba(0, 0, 0, 0.12);
    --shadow-card: 0 10px 40px -5px rgba(0, 0, 0, 0.08);
    --shadow-floating: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-emerald: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-bg: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    --gradient-mesh:
        radial-gradient(at 40% 20%, hsla(28,100%,74%,1) 0px, transparent 50%),
        radial-gradient(at 80% 0%, hsla(189,100%,56%,1) 0px, transparent 50%),
        radial-gradient(at 0% 50%, hsla(355,100%,93%,1) 0px, transparent 50%),
        radial-gradient(at 80% 50%, hsla(340,100%,76%,1) 0px, transparent 50%),
        radial-gradient(at 0% 100%, hsla(22,100%,77%,1) 0px, transparent 50%),
        radial-gradient(at 80% 100%, hsla(242,100%,70%,1) 0px, transparent 50%),
        radial-gradient(at 0% 0%, hsla(343,100%,76%,1) 0px, transparent 50%);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--gradient-mesh);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.4) 0%, transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(255, 122, 178, 0.3) 0%, transparent 60%),
        radial-gradient(circle at 40% 40%, rgba(120, 119, 198, 0.2) 0%, transparent 60%);
    pointer-events: none;
    z-index: -2;
    animation: backgroundFloat 20s ease-in-out infinite;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.02) 50%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    animation: shimmer 8s ease-in-out infinite;
}

.navbar {
    background:
        linear-gradient(135deg,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(248, 250, 255, 0.98) 50%,
            rgba(255, 255, 255, 0.95) 100%);
    backdrop-filter: blur(40px) saturate(150%);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    box-shadow:
        0 8px 40px rgba(102, 126, 234, 0.12),
        0 1px 3px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(255, 255, 255, 0.2);
    border: none;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: navbarFloat 0.6s ease-out;
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow:
        0 12px 48px rgba(102, 126, 234, 0.18),
        0 2px 6px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

@keyframes navbarFloat {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    background-size: 200% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(102, 126, 234, 0.3) 20%,
        rgba(240, 147, 251, 0.3) 50%,
        rgba(102, 126, 234, 0.3) 80%,
        transparent 100%);
    animation: shimmerLine 4s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes shimmerLine {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
    position: relative;
    background: linear-gradient(45deg,
        #667eea 0%,
        #764ba2 25%,
        #f093fb 50%,
        #f5576c 75%,
        #667eea 100%);
    background-size: 300% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: brandGlow 4s ease-in-out infinite;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.navbar-brand::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--gradient-primary), var(--gradient-accent));
    border-radius: 12px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    filter: blur(8px);
}

.navbar-brand:hover::before {
    opacity: 0.3;
}

.navbar-brand:hover {
    transform: scale(1.05);
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

@keyframes brandGlow {
    0%, 100% {
        background-position: 0% 50%;
        filter: brightness(1);
    }
    50% {
        background-position: 100% 50%;
        filter: brightness(1.2);
    }
}

.navbar .nav-link {
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    margin-inline: 0.4rem;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

.navbar .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(102, 126, 234, 0.2),
        rgba(240, 147, 251, 0.2),
        transparent);
    transition: left 0.6s ease;
}

.navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width 0.4s ease;
}

.navbar .nav-link:hover::before {
    left: 100%;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: var(--brand-primary);
    background: linear-gradient(135deg,
        rgba(102, 126, 234, 0.15) 0%,
        rgba(240, 147, 251, 0.1) 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow:
        0 8px 25px rgba(102, 126, 234, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(102, 126, 234, 0.3);
}

.navbar .nav-link:hover::after {
    width: 80%;
}

.navbar .nav-link.active {
    color: white;
    background: var(--gradient-primary);
    font-weight: 700;
    box-shadow:
        0 8px 30px rgba(102, 126, 234, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.navbar .nav-link.active::after {
    width: 100%;
    background: rgba(255, 255, 255, 0.5);
}

/* 瀵艰埅鏍忓鍣ㄨ楗?*/
.navbar .container {
    position: relative;
}

.navbar .container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -30px;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

.navbar .container::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -30px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, rgba(240, 147, 251, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
    pointer-events: none;
    z-index: -1;
}

/* 瀵艰埅鏍忓垎闅旇楗?*/
.navbar-nav .nav-item:not(:last-child) {
    position: relative;
}

.navbar-nav .nav-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -0.2rem;
    transform: translateY(-50%);
    width: 1px;
    height: 20px;
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(102, 126, 234, 0.3) 20%,
        rgba(240, 147, 251, 0.3) 50%,
        rgba(102, 126, 234, 0.3) 80%,
        transparent 100%);
    opacity: 0.6;
}

.app-shell {
    max-width: 1200px;
    margin-inline: auto;
    padding: 3rem 1.25rem 4rem;
}

.page-hero {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.page-hero .badge {
    background: var(--gradient-accent);
    color: white;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.5rem 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 4px 20px rgba(240, 147, 251, 0.4);
}

.page-hero h1 {
    font-weight: 700;
    color: var(--text-main);
}

.card-lift {
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        var(--shadow-card),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    position: relative;
    overflow: hidden;
}

.card-lift::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 30% 30%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        linear-gradient(45deg, transparent 0%, rgba(255, 255, 255, 0.15) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card-lift::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    border-radius: 26px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card-lift:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-floating);
    border-color: rgba(102, 126, 234, 0.4);
}

.card-lift:hover::before {
    opacity: 1;
}

.card-lift:hover::after {
    opacity: 0.1;
}

.card-header.bg-white {
    background: transparent !important;
}

.section-title {
    font-weight: 600;
    color: var(--text-main);
}

.lead-muted {
    color: var(--text-muted);
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    padding-inline: 2rem;
    padding-block: 0.875rem;
    font-weight: 600;
    border-radius: 16px;
    box-shadow:
        0 8px 32px rgba(102, 126, 234, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover::after {
    width: 120px;
    height: 120px;
}

.btn-primary:focus,
.btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow:
        0 16px 48px rgba(102, 126, 234, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-outline-secondary {
    border-radius: 12px;
    border: 1px solid rgba(30, 41, 59, 0.1);
    color: var(--text-main);
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background-color: var(--brand-secondary);
    border-color: var(--brand-secondary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.btn-outline-danger {
    border-radius: 12px;
    border: 1px solid var(--brand-rose);
    color: var(--brand-rose);
    font-weight: 500;
    background: transparent;
    transition: all 0.3s ease;
}

.btn-outline-danger:hover {
    background-color: var(--brand-rose);
    border-color: var(--brand-rose);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

/* 灏忓昂瀵告寜閽牱寮?*/
.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 8px;
}

/* 鎸夐挳缁勫悎闂磋窛 */
.btn + .btn,
.btn + form {
    margin-left: 0.25rem;
}

.form-control,
.form-select,
textarea {
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.18);
    padding: 0.65rem 0.9rem;
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.9);
}

.form-control:focus,
.form-select:focus,
textarea:focus {
    box-shadow: 0 0 0 0.2rem rgba(76, 110, 245, 0.15);
    border-color: rgba(76, 110, 245, 0.4);
}

.table thead th {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.table tbody tr td {
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.info-tile {
    border-radius: 20px;
    padding: 1.75rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(240, 147, 251, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.info-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-accent);
}

.info-tile h2 {
    font-weight: 600;
}

.recent-list .list-group-item {
    border: none;
    border-radius: 14px;
    margin-bottom: 0.7rem;
    padding: 0.95rem 1.1rem;
    background: rgba(248, 250, 255, 0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 14px 25px -18px rgba(15, 23, 42, 0.3);
}

.recent-list .list-group-item:last-child {
    margin-bottom: 0;
}

.recent-empty {
    color: var(--text-muted);
    border-radius: 14px;
    background: rgba(248, 250, 255, 0.9);
    padding: 1.1rem 1.2rem;
}

.badge-soft {
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(240, 147, 251, 0.15));
    color: var(--brand-secondary);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.invoice-meta {
    background: rgba(37, 51, 102, 0.06);
    border-radius: 18px;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(76, 110, 245, 0.15);
}

.table tfoot th {
    border-top: none;
    font-size: 0.95rem;
}

.footer-note {
    font-size: 0.85rem;
    color: var(--text-muted);
}

@media (max-width: 767px) {
    .app-shell {
        padding: 2.25rem 1rem 3rem;
    }

    .card-lift {
        border-radius: 18px;
    }
}

#items-table .remove-item {
    white-space: nowrap;
}

/* Service Items琛ㄦ牸 - 绠€鍖栨牱寮忥紝鍙傝€僒ax Rates鎴愬姛缁忛獙 */
#items-table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.03);
}

/* 绉婚櫎鎵€鏈夊彲鑳藉鑷存粴鍔ㄦ潯鐨則ransform鍜宧over鏁堟灉 */
#items-table tbody tr {
    position: static !important;
    transform: none !important;
    transition: background-color 0.2s ease;
}

#items-table tbody tr:hover {
    transform: none !important;
    background-color: rgba(102, 126, 234, 0.03) !important;
    box-shadow: none !important;
}


.recent-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.recent-info {
    flex: 1;
    min-width: 0;
}

.recent-info .invoice-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.recent-info .invoice-link-number {
    font-weight: 600;
}

.recent-info .invoice-link-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.recent-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
}

.recent-actions-main {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.recent-status {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(102, 126, 234, 0.12);
    color: var(--brand-secondary);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.recent-actions-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.recent-actions-controls form {
    margin: 0;
}

.recent-amount {
    font-weight: 600;
}

@media (max-width: 576px) {
    .recent-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .recent-actions {
        align-items: flex-start;
    }

    .recent-actions-controls {
        justify-content: flex-start;
    }
}


/* 楂樼骇鍔ㄧ敾鏁堟灉 */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

@keyframes slideInFromBottom {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes backgroundFloat {
    0%, 100% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes morphing {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(240, 147, 251, 0.5);
    }
}

@keyframes wiggle {
    0%, 7% { transform: rotateZ(0); }
    15% { transform: rotateZ(-15deg); }
    20% { transform: rotateZ(10deg); }
    25% { transform: rotateZ(-10deg); }
    30% { transform: rotateZ(6deg); }
    35% { transform: rotateZ(-4deg); }
    40%, 100% { transform: rotateZ(0); }
}

/* 椤甸潰鍔犺浇鍔ㄧ敾 */
.card-lift {
    animation: slideInFromBottom 0.6s ease-out;
}

.card-lift:nth-child(2) {
    animation-delay: 0.2s;
}

.card-lift:nth-child(3) {
    animation-delay: 0.4s;
}

/* 琛ㄥ崟杈撳叆妗嗙編鍖栧寮?*/
.form-control,
.form-select,
textarea {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
    border-color: var(--brand-primary);
    box-shadow:
        0 0 0 0.25rem rgba(102, 126, 234, 0.15),
        0 8px 32px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px) scale(1.02);
    background-color: rgba(255, 255, 255, 1);
}

.form-control:hover,
.form-select:hover,
textarea:hover {
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

/* 鎸夐挳缁勭編鍖?*/
.btn-group-toggle .btn {
    transition: all 0.3s ease;
}

/* 琛ㄦ牸琛屾偓鍋滄晥鏋滃寮?- 鎺掗櫎Service Items琛ㄦ牸 */
.table:not(#items-table) tbody tr {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.table:not(#items-table) tbody tr::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gradient-primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.table:not(#items-table) tbody tr:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.08) 0%, rgba(240, 147, 251, 0.04) 100%);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.1);
}

.table:not(#items-table) tbody tr:hover::before {
    transform: scaleY(1);
}

/* 椤甸潰瑁呴グ鎬у厓绱犲寮?*/
.app-shell {
    position: relative;
}

.app-shell::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(240, 147, 251, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

.app-shell::after {
    content: '';
    position: absolute;
    top: 100px;
    right: 10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 12s ease-in-out infinite reverse;
    pointer-events: none;
    z-index: -1;
}

/* 椤甸潰瑙掕惤瑁呴グ */
body::before {
    background:
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.4) 0%, transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(255, 122, 178, 0.3) 0%, transparent 60%),
        radial-gradient(circle at 40% 40%, rgba(120, 119, 198, 0.2) 0%, transparent 60%),
        radial-gradient(circle at 90% 90%, rgba(16, 185, 129, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 10% 10%, rgba(244, 63, 94, 0.2) 0%, transparent 50%);
}

/* 鍗＄墖瑁呴グ绾挎潯 */
.card-lift .card-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--brand-accent), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-lift:hover .card-body::before {
    opacity: 1;
}

/* 鎴愬姛鐘舵€佸窘绔?*/
.badge.bg-success {
    background: var(--gradient-emerald) !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    animation: pulse 2s infinite;
}

/* 鍥炬爣鎮仠鏁堟灉 */
.bi {
    transition: all 0.3s ease;
}

.btn:hover .bi {
    transform: scale(1.1) rotate(5deg);
}

.nav-link:hover .bi {
    animation: wiggle 1s ease-in-out;
}

/* 鍒楄〃椤规偓鍋滄晥鏋?*/
.list-group-item {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.list-group-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s ease;
}

.list-group-item:hover::before {
    left: 100%;
}

.list-group-item:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

/* 寰界珷鎮仠鏁堟灉 */
.badge-soft {
    transition: all 0.3s ease;
    cursor: pointer;
}

.badge-soft:hover {
    transform: scale(1.1) rotate(-2deg);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* 鍗＄墖浣撹楗?*/
.card-body {
    position: relative;
}

.card-body::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(240, 147, 251, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: morphing 6s ease-in-out infinite;
    pointer-events: none;
}

/* 璀﹀憡鍜屾垚鍔熸秷鎭編鍖?*/
.alert {
    border: none;
    border-radius: 16px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.alert-success {
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.1), rgba(56, 178, 172, 0.1));
    color: #22543d;
    border-left: 4px solid #48bb78;
}

.alert-success::before {
    background: #48bb78;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(245, 101, 101, 0.1), rgba(229, 62, 62, 0.1));
    color: #742a2a;
    border-left: 4px solid #f56565;
}

.alert-danger::before {
    background: #f56565;
}

/* 琛ㄥ崟鏍囩缇庡寲 */
.form-label {
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    position: relative;
}

.form-label::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.form-control:focus + .form-label::after,
.form-select:focus + .form-label::after {
    width: 100%;
}

/* 琛ㄥ崟瀹瑰櫒缇庡寲 */
.card-body {
    position: relative;
}

/* 鎻愪氦鎸夐挳鐗规畩鏁堟灉 */
.btn[type="submit"] {
    position: relative;
    overflow: hidden;
}

.btn[type="submit"]::after {
    content: '鉁?;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: white;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    opacity: 0;
}

.btn[type="submit"]:active::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    transition: all 0.2s ease;
}

/* 杈撳叆妗嗙粍鍚堟晥鏋?*/
.row.g-3 .col-md-6:nth-child(odd) .form-control {
    animation-delay: 0.1s;
}

.row.g-3 .col-md-6:nth-child(even) .form-control {
    animation-delay: 0.2s;
}

/* 椤甸潰杩涘叆鍔ㄧ敾 */
.page-hero {
    animation: slideInFromBottom 0.8s ease-out;
}

/* 榧犳爣璺熼殢鏁堟灉 */
.page-hero {
    position: relative;
    overflow: hidden;
}

.page-hero::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    opacity: 0;
}

.page-hero:hover::after {
    opacity: 1;
}

/* 鐗规畩鏂囧瓧鏁堟灉 */
.display-6 {
    background: linear-gradient(45deg, var(--text-main), var(--brand-primary), var(--brand-accent));
    background-size: 300% 300%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShine 4s ease-in-out infinite;
}

@keyframes textShine {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* 鍔犺浇楠ㄦ灦灞忔晥鏋?*/
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 3D 鎸夐挳鏁堟灉 */
.btn-primary {
    transform-style: preserve-3d;
}

.btn-primary:active {
    transform: translateY(-3px) scale(1.05) rotateX(2deg);
}

/* 鍝嶅簲寮忔敼杩?*/
@media (max-width: 768px) {
    .app-shell::before,
    .app-shell::after {
        display: none;
    }

    .card-lift {
        animation-delay: 0s;
        border-radius: 20px;
    }

    .navbar .nav-link {
        margin-inline: 0.2rem;
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        border-radius: 16px;
    }

    .navbar-collapse {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        border-radius: 20px;
        margin-top: 1rem;
        padding: 1rem;
        box-shadow: 0 8px 32px rgba(102, 126, 234, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.3);
    }

    .navbar-toggler {
        border: none;
        padding: 0.5rem;
        background: rgba(102, 126, 234, 0.1);
        border-radius: 12px;
        transition: all 0.3s ease;
    }

    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    }

    .navbar-toggler:hover {
        background: rgba(102, 126, 234, 0.2);
        transform: scale(1.05);
    }

    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23667eea' stroke-linecap='round' stroke-miterlimit='10' stroke-width='3' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
        transition: transform 0.3s ease;
    }

    .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
        transform: rotate(90deg);
    }

    .card-lift:hover {
        transform: translateY(-6px) scale(1.01);
    }

    .display-6 {
        font-size: 2rem;
    }

    .btn-primary {
        padding-inline: 1.5rem;
        padding-block: 0.75rem;
    }
}

@media (max-width: 480px) {
    .page-hero {
        border-radius: 18px;
    }

    .card-lift {
        border-radius: 18px;
    }

    .btn-primary {
        border-radius: 12px;
    }
}





/* Confirmation modal styling */
.confirm-modal .modal-dialog {
    max-width: 420px;
}

.confirm-modal .modal-backdrop.show {
    backdrop-filter: blur(6px);
}

.confirmation-card {
    position: relative;
    padding: 2.2rem 2.4rem 1.8rem;
    border: none;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 28px 70px -28px rgba(15, 23, 42, 0.65);
    overflow: hidden;
}

.confirmation-glow {
    position: absolute;
    inset: -40% -20% auto -20%;
    height: 70%;
    background: radial-gradient(circle at top, rgba(102, 126, 234, 0.35), transparent 65%);
    opacity: 0.9;
    pointer-events: none;
}

.confirm-modal[data-tone="danger"] .confirmation-glow {
    background: radial-gradient(circle at top, rgba(244, 63, 94, 0.38), transparent 65%);
}

.confirmation-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: var(--gradient-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 1.5rem auto;
    box-shadow: 0 18px 30px -18px rgba(102, 126, 234, 0.65);
}

.confirm-modal[data-tone="danger"] .confirmation-icon {
    background: linear-gradient(135deg, #f43f5e 0%, #fb7185 100%);
    box-shadow: 0 18px 30px -18px rgba(244, 63, 94, 0.65);
}

.confirmation-text {
    margin-bottom: 1.6rem;
}

.confirmation-title {
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-main);
}

.confirmation-text p {
    margin-top: 0.6rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.confirmation-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.confirmation-cancel,
.confirmation-approve {
    border-radius: 14px;
    padding: 0.65rem 1.6rem;
    font-weight: 600;
}

.confirmation-cancel {
    background: rgba(102, 126, 234, 0.1);
    border: none;
    color: var(--brand-secondary);
    box-shadow: inset 0 0 0 1px rgba(102, 126, 234, 0.18);
}

.confirmation-cancel:hover {
    background: rgba(102, 126, 234, 0.18);
    color: var(--brand-secondary);
}

.confirmation-approve {
    border: none;
    box-shadow: 0 14px 28px -16px rgba(15, 23, 42, 0.6);
}

.confirmation-approve.btn-danger {
    background: linear-gradient(135deg, #f43f5e 0%, #fb7185 100%);
}

.confirmation-approve.btn-primary,
.confirmation-approve.btn-success,
.confirmation-approve.btn-warning {
    color: #fff;
}

.confirmation-approve.btn-primary {
    background: var(--gradient-primary);
}

.confirmation-approve.btn-success {
    background: var(--gradient-emerald);
}

.confirmation-approve.btn-warning {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
}

@media (max-width: 576px) {
    .confirmation-card {
        padding: 2rem 1.75rem 1.6rem;
    }

    .confirmation-actions {
        flex-direction: column-reverse;
    }

    .confirmation-cancel,
    .confirmation-approve {
        width: 100%;
    }
}
.confirm-modal[data-tone="success"] .confirmation-glow {
    background: radial-gradient(circle at top, rgba(16, 185, 129, 0.32), transparent 65%);
}

.confirm-modal[data-tone="success"] .confirmation-icon {
    background: var(--gradient-emerald);
    box-shadow: 0 18px 30px -18px rgba(16, 185, 129, 0.6);
}

.confirm-modal[data-tone="warning"] .confirmation-glow {
    background: radial-gradient(circle at top, rgba(249, 115, 22, 0.32), transparent 65%);
}

.confirm-modal[data-tone="warning"] .confirmation-icon {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    box-shadow: 0 18px 30px -18px rgba(249, 115, 22, 0.55);
}
