:root {
    --primary: #2DD4BF;
    --primary-dark: #0F7290;
    --secondary: #0891B2;
    --accent: #F59E0B;
    --text-dark: #1F2937;
    --text-light: #6B7280;
    --background: #F8FAFC;
    --card-bg: #FFFFFF;
    --border-radius: 12px;
    --box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    --colorful-grad1: #FF9A8B;
    --colorful-grad2: #FF6A88;
    --colorful-grad3: #FF99AC;
    --minimalist-bg: #FCFCFC;
    --minimalist-accent: #333333;
    --minimalist-border: #EEEEEE;
}

body {
    font-family: "Noto Sans Thai", 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background-color: var(--background);
    padding-bottom: 50px;
}

/* Navbar */
.navbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-dark);
}

.navbar-brand i {
    color: var(--primary);
}

/* Language Switcher */
.language-switcher {
    display: flex;
}

.language-switcher button {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
    border: none;
    transition: all 0.3s;
}

.language-switcher button:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.language-switcher button:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.language-switcher button.active {
    background-color: var(--primary);
    color: white;
    font-weight: 500;
}

.language-switcher button:not(.active) {
    background-color: #e2e8f0;
    color: #64748b;
}

/* Hero Section */
.hero {
    padding: 5rem 0;
    text-align: center;
}

.logo {
    width: 120px;
    height: 120px;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.hero .lead {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.cta-buttons {
    margin-top: 2rem;
}

/* Feature Cards */
.features {
    padding: 4rem 0;
}

.feature-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    height: 100%;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Card Styles for All Sections */
.bill-card, .history-card, .section-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
}

.section-card {
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
}

.bill-header, .history-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.bill-header h2, .history-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.bill-header p {
    color: var(--text-light);
    margin-bottom: 0;
}

/* Form Elements */
.form-label {
    font-weight: 500;
    color: var(--text-dark);
}

.form-control, .form-select {
    padding: 0.7rem 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: none;
    transition: all 0.3s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.25);
}

.form-text {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* Participant Items */
.participant-item {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 8px;
}

/* Item Styling */
.item-card {
    background-color: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.item-title {
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.item-price {
    color: var(--primary-dark);
    font-weight: 700;
}

.participants-check {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

/* PromptPay ID Selector */
.pp-id-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.pp-id-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-color: var(--background);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.pp-id-option i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.pp-id-option span {
    font-weight: 500;
}

.pp-id-option.active {
    background-color: var(--primary);
    color: white;
}

.pp-id-option.active i {
    color: white;
}

.pp-id-option:hover:not(.active) {
    background-color: #e5e7eb;
}

/* Template Selector */
.template-selector {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.template-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 1rem;
}

.template-preview {
    width: 120px;
    height: 180px;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    border: 2px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s;
}

.modern-preview {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.casual-preview {
    background: white;
    border: 2px solid #e2e8f0;
}

.cute-preview {
    background: linear-gradient(135deg, #fbcfe8 0%, #fecdd3 100%);
}

.minimalist-preview {
    background: var(--minimalist-bg);
    border: 1px solid var(--minimalist-border);
}

.colorful-preview {
    background: linear-gradient(135deg, var(--colorful-grad1) 0%, var(--colorful-grad2) 50%, var(--colorful-grad3) 100%);
}

.template-option.active .template-preview {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.25);
}

.template-option span {
    font-weight: 500;
}

.template-option.active span {
    color: var(--primary);
}

/* Bill Preview Styles */
.preview-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
}

.preview-container {
    background-color: #f1f5f9;
    padding: 2rem;
    border-radius: var(--border-radius);
}

/* Bill Templates */
.bill-template {
    max-width: 500px;
    margin: 0 auto;
    border-radius: var(--border-radius);
    overflow: hidden;
}

/* Modern Template */
.modern-template {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem;
}

.modern-template .header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.modern-template .header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.modern-template .header .date {
    opacity: 0.8;
    font-size: 1rem;
}

.modern-template .qr-container {
    background-color: white;
    padding: 1rem;
    border-radius: 8px;
    margin: 0 auto 1.5rem;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modern-template .total-amount {
    text-align: center;
    margin-bottom: 1.5rem;
}

.modern-template .total-amount h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.modern-template .total-amount .amount {
    font-size: 2.5rem;
    font-weight: 700;
}

.modern-template .items, .modern-template .participants {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.modern-template .section-title {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.modern-template .section-title i {
    margin-right: 0.75rem;
}

.modern-template .item-row, .modern-template .participant-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modern-template .item-row:last-child, .modern-template .participant-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.modern-template .item-name, .modern-template .participant-name {
    font-weight: 500;
}

.modern-template .item-price, .modern-template .participant-share {
    font-weight: 700;
}

.modern-template .footer {
    text-align: center;
    margin-top: 2rem;
    opacity: 0.8;
    font-size: 0.875rem;
}

/* Casual Template */
.casual-template {
    background: white;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.casual-template .header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.casual-template .header-left h2 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
    color: var(--primary-dark);
}

.casual-template .date {
    color: var(--text-light);
}

.casual-template .header-right .amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-dark);
    text-align: right;
}

.casual-template .header-right .total-label {
    text-align: right;
    color: var(--text-light);
    font-size: 0.875rem;
}

.casual-template .divider {
    height: 1px;
    background-color: #e2e8f0;
    margin: 1.5rem 0;
}

.casual-template .section {
    margin-bottom: 2rem;
}

.casual-template .section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.casual-template .item-row, .casual-template .participant-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.casual-template .item-name, .casual-template .participant-name {
    color: var(--text-dark);
}

.casual-template .item-price, .casual-template .participant-share {
    font-weight: 600;
}

.casual-template .qr-section {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.casual-template .qr-container {
    width: 150px;
    height: 150px;
}

.casual-template .qr-info {
    flex: 1;
}

.casual-template .qr-info p {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.casual-template .promptpay-id {
    font-weight: 600;
}

.casual-template .footer {
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
    margin-top: 2rem;
}

/* Cute Template */
.cute-template {
    background: linear-gradient(135deg, #fbcfe8 0%, #fecdd3 100%);
    padding: 2rem;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.cute-template::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 15px;
    background-image: linear-gradient(45deg, #fbcfe8 25%, transparent 25%), 
                     linear-gradient(-45deg, #fbcfe8 25%, transparent 25%);
    background-size: 20px 20px;
    z-index: 1;
}

.cute-template .header {
    text-align: center;
    margin-bottom: 2rem;
}

.cute-template .title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.cute-template .title-icon {
    margin: 0 0.75rem;
    font-size: 1.25rem;
    color: #db2777;
}

.cute-template .header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #db2777;
}

.cute-template .date {
    color: #9d174d;
    opacity: 0.8;
}

.cute-template .qr-container {
    background-color: white;
    border: 3px dashed #f9a8d4;
    border-radius: 15px;
    padding: 1rem;
    margin: 0 auto 2rem;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.cute-template .star {
    position: absolute;
    font-size: 1.25rem;
    color: #f9a8d4;
}

.cute-template .star-1 {
    top: -10px;
    left: -10px;
}

.cute-template .star-2 {
    top: -10px;
    right: -10px;
}

.cute-template .star-3 {
    bottom: -10px;
    left: -10px;
}

.cute-template .star-4 {
    bottom: -10px;
    right: -10px;
}

.cute-template .total-amount {
    background-color: white;
    border-radius: 15px;
    padding: 1rem;
    text-align: center;
    margin-bottom: 2rem;
}

.cute-template .total-amount h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #db2777;
}

.cute-template .total-amount .amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: #9d174d;
}

.cute-template .section {
    background-color: rgba(255, 255, 255, 0.5);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
}

.cute-template .section-title {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: #db2777;
    font-weight: 600;
}

.cute-template .section-title i {
    margin-right: 0.75rem;
}

.cute-template .item-row, .cute-template .participant-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed #f9a8d4;
}

.cute-template .item-row:last-child, .cute-template .participant-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.cute-template .item-icon, .cute-template .participant-icon {
    margin-right: 0.5rem;
    color: #9d174d;
}

.cute-template .item-price, .cute-template .participant-share {
    font-weight: 600;
    color: #9d174d;
}

.cute-template .footer {
    text-align: center;
    margin-top: 2rem;
    color: #9d174d;
    font-weight: 500;
}

.cute-template .footer-icon {
    margin: 0 0.5rem;
}

/* Minimalist Template */
.minimalist-template {
    background-color: var(--minimalist-bg);
    padding: 2rem;
    color: var(--minimalist-accent);
    font-family: 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.minimalist-wrapper {
    padding: 0;
}

.minimalist-template .header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--minimalist-border);
}

.minimalist-template .header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.minimalist-template .date {
    font-size: 0.875rem;
    color: #777;
}

.minimalist-template .total-section {
    text-align: center;
    margin-bottom: 2.5rem;
}

.minimalist-template .label {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 0.5rem;
}

.minimalist-template .total-amount {
    font-size: 2.5rem;
    font-weight: 700;
}

.minimalist-template .qr-section {
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.minimalist-template .qr-container {
    background-color: white;
    padding: 1rem;
    border: 1px solid var(--minimalist-border);
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.minimalist-template .content-section {
    margin-bottom: 2rem;
}

.minimalist-template .section-heading {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--minimalist-border);
    padding-bottom: 0.5rem;
}

.minimalist-template .section-content {
    padding: 0.5rem 0;
}

.minimalist-template .item-row,
.minimalist-template .participant-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f5f5f5;
}

.minimalist-template .item-row:last-child,
.minimalist-template .participant-row:last-child {
    border-bottom: none;
}

.minimalist-template .item-name,
.minimalist-template .participant-name {
    font-weight: 400;
}

.minimalist-template .item-price,
.minimalist-template .participant-share {
    font-weight: 600;
}

.minimalist-template .footer {
    text-align: center;
    margin-top: 3rem;
    font-size: 0.75rem;
    color: #999;
}

/* Colorful Template */
.colorful-template {
    background: linear-gradient(135deg, var(--colorful-grad1) 0%, var(--colorful-grad2) 50%, var(--colorful-grad3) 100%);
    padding: 2rem;
    color: white;
    font-family: 'Noto Sans Thai', 'Quicksand', sans-serif;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.colorful-wrapper {
    padding: 0;
}

.colorful-template .header {
    text-align: center;
    margin-bottom: 2rem;
}

.colorful-template .header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, #fff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.colorful-template .date {
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
}

.colorful-template .qr-container {
    background-color: white;
    padding: 1rem;
    border-radius: 12px;
    margin: 0 auto 2rem;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.rainbow-border {
    position: relative;
}

.rainbow-border::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 16px;
    background: linear-gradient(45deg, #ff0000, #ff8000, #ffff00, #80ff00, #00ff00, #00ff80, #00ffff, #0080ff, #0000ff, #8000ff, #ff00ff, #ff0080);
    z-index: -1;
    animation: rainbow 10s linear infinite;
}

@keyframes rainbow {
    0% { background-position: 0% 0%; }
    100% { background-position: 300% 0%; }
}

.colorful-template .total-amount-colorful {
    background-color: rgba(255,255,255,0.2);
    text-align: center;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.colorful-template .amount-label {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.colorful-template .amount-value {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, #fff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.colorful-template .section {
    margin-bottom: 1.5rem;
    border-radius: 12px;
    padding: 1.5rem;
}

.colorful-template .items-section {
    background-color: rgba(255,255,255,0.2);
}

.colorful-template .participants-section {
    background-color: rgba(255,255,255,0.2);
}

.colorful-template .section-title {
    margin-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    padding-bottom: 0.8rem;
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
}

.colorful-template .section-title i {
    margin-right: 0.75rem;
}

.colorful-template .participant-row,
.colorful-template .item-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.colorful-template .participant-row:hover,
.colorful-template .item-row:hover {
    transform: translateX(3px);
}

.colorful-template .participant-name,
.colorful-template .item-name {
    font-weight: 500;
}

.colorful-template .participant-share,
.colorful-template .item-price {
    font-weight: 700;
}

.colorful-template .footer {
    text-align: center;
    margin-top: 2rem;
    color: rgba(255,255,255,0.7);
    font-size: 0.875rem;
}

/* History Item Styles */
.history-item {
    padding: 1.5rem;
    border-radius: 8px;
    background-color: #f8fafc;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.history-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    background-color: white;
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.history-item-title {
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--primary-dark);
}

.history-item-date {
    color: var(--text-light);
    font-size: 0.875rem;
}

.history-item-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.empty-history {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-style: italic;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    font-weight: 500;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    #print-container, #print-container * {
        visibility: visible;
    }
    #print-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .feature-card, .bill-card, .history-card, .section-card {
        padding: 1.5rem;
    }
    
    .pp-id-selector {
        flex-direction: row;
    }
    
    .template-selector {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .preview-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .action-buttons {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    body {
        padding-bottom: 70px; /* เพิ่มพื้นที่ด้านล่างเพื่อรองรับปุ่มแชร์ */
    }
    
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    /* ปรับขนาดตัวอักษรให้เหมาะกับหน้าจอเล็ก */
    h1 {
        font-size: 1.8rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    h3 {
        font-size: 1.2rem !important;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .logo {
        width: 80px;
        height: 80px;
    }
    
    /* ปรับขนาดปุ่ม CTA ให้ใหญ่ขึ้นและเด่นชัด */
    .cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .cta-buttons .btn {
        width: 100%;
        padding: 0.75rem 1rem;
    }
    
    /* ลบ margin ในปุ่มที่สอง เพื่อให้ layout ไม่พัง */
    .cta-buttons .btn-outline-primary {
        margin-left: 0 !important;
    }
}

/* Mobile Optimization - Create Bill Page */
@media (max-width: 576px) {
    /* ปรับขนาดการ์ดให้แคบลง */
    .bill-card, .section-card {
        padding: 1rem;
    }
    
    /* ปรับขนาดปุ่มลบให้ใหญ่ขึ้นเพื่อง่ายต่อการกด */
    .remove-participant, .remove-item {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* จัดการ layout ของ participant item */
    .participant-item .row {
        display: flex;
        align-items: center;
    }
    
    /* ปรับการจัดวางแถว participant checkbox ให้ดีขึ้น */
    .participants-check {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    /* ปรับการแสดงผลของ PromptPay selector */
    .pp-id-selector {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .pp-id-option {
        flex: 1;
        padding: 0.75rem 0.5rem;
    }
    
    /* ปรับปรุงการแสดงผลของ template selector */
    .template-selector {
        gap: 0.75rem;
        justify-content: space-between;
    }
    
    .template-preview {
        width: 90px;
        height: 140px;
    }
    
    /* ทำให้ปุ่มสร้างบิลเด่นชัดขึ้น */
    #bill-form button[type="submit"] {
        border-radius: 50px;
        padding: 0.75rem 0;
        position: sticky;
        bottom: 1rem;
        margin-top: 2rem;
        box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    }

    /* แก้ไขการแสดงผลของปุ่มลบในรายการค่าใช้จ่าย */
    .item-card .row .col-md-1.col-1 {
        padding-left: 0;
        padding-right: 0;
    }

    .item-title .row {
        flex-wrap: nowrap !important;
    }
}

/* Mobile Optimization - Bill Preview Page */
@media (max-width: 576px) {
    /* ปรับรูปแบบการแสดงปุ่มกลับและปุ่มดาวน์โหลด */
    .preview-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .action-buttons {
        width: 100%;
        display: flex;
    }
    
    .action-buttons .btn {
        flex: 1;
        white-space: nowrap;
    }
    
    /* ปรับขนาดและ padding ของ bill render container */
    .preview-container {
        padding: 0.75rem;
    }
    
    /* ปรับขนาดฟอนต์ใน template */
    .bill-template {
        font-size: 0.9rem;
    }
    
    .bill-template .header h2 {
        font-size: 1.5rem;
    }
    
    .bill-template .total-amount .amount {
        font-size: 2rem;
    }
    
    /* ทำให้ QR Code มีขนาดพอดีกับหน้าจอ */
    .qr-container {
        width: 150px !important;
        height: 150px !important;
    }
    
    .qr-container img {
        max-width: 100%;
        max-height: 100%;
    }
    
    /* ทำให้ปุ่มแชร์เด่นชัดและใช้งานง่าย */
    .share-container {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 0.75rem 1rem;
        margin: 0;
        background-color: white;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
    }
}

/* Mobile Optimization - History Page */
@media (max-width: 576px) {
    /* ปรับขนาดและ spacing ของรายการประวัติ */
    .history-item {
        padding: 1rem;
    }
    
    .history-item-title {
        font-size: 1.1rem;
    }
    
    .history-item-amount {
        font-size: 1.3rem;
    }
}

/* ปรับแต่งการแสดงผลสำหรับอุปกรณ์ tablet */
@media (min-width: 577px) and (max-width: 768px) {
    .cta-buttons {
        display: flex;
        justify-content: center;
    }
    
    .template-selector {
        justify-content: center;
    }
    
    .pp-id-selector {
        flex-direction: row;
    }
    
    /* ปรับขนาด font และ container */
    .bill-template {
        font-size: 0.95rem;
    }
}

/* ปรับปรุงการแสดงผลปุ่มภาษาบนหน้าจอขนาดเล็ก */
@media (max-width: 992px) {
    .language-switcher {
        margin-top: 1rem;
    }
}

/* ปรับปรุง Fixed Footer สำหรับทุกอุปกรณ์ */
.fixed-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    justify-content: center;
}

/* Animation สำหรับธีม Cute */
@media (max-width: 576px) {
    .cute-template .star {
        font-size: 1rem;
    }
}

/* ปรับปรุงรูปแบบของ toast notification */
.toast-container {
    bottom: 70px !important; /* ย้ายขึ้นเพื่อไม่ให้ถูกปุ่มแชร์บัง */
}

.toast {
    width: 280px;
    font-size: 0.9rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.share-container {
    position: sticky;
    bottom: 0;
    background-color: var(--background);
    padding: 1rem;
    margin: 0 -1rem;
    border-top: 1px solid #eee;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 100;
}

.share-container .btn {
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1.2rem;
    background-color: var(--accent);
    border-color: var(--accent);
}

.share-container .btn:hover {
    background-color: #e67e00;
    border-color: #e67e00;
}

.remove-item,
.remove-participant {
    width: 38px;
    height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.remove-item i,
.remove-participant i {
    font-size: 14px;
}

/* ทำให้ปุ่มลบมี hover effect ที่ชัดเจน */
.remove-item:hover,
.remove-participant:hover {
    background-color: #dc3545;
    color: white;
}

/* ทำให้รายการและผู้ร่วมจ่ายมี visual hint ว่าสามารถลบได้ */
.item-card:hover,
.participant-item:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

/* แก้ไขปัญหา modal backdrop กรณีที่มีการเปิด modal */
.modal-backdrop {
    z-index: 1040 !important;
}

.modal {
    z-index: 1050 !important;
}

/* ปรับปรุงในมือถือ */
@media (max-width: 576px) {
    .remove-item,
    .remove-participant {
        width: 32px;
        height: 32px;
    }
    
    .item-card .row,
    .participant-item .row {
        margin-right: 0;
    }
}

/* How to section */
.how-to-use {
    padding: 5rem 0;
    background-color: #f8fafc;
}

.how-to-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    height: 100%;
    box-shadow: var(--box-shadow);
    position: relative;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.how-to-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.step-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary);
    color: white;
    width: 36px;
    height: 36px;
    line-height: 36px;
    border-radius: 50%;
    font-weight: 700;
}

.step-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.how-to-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* FAQ section */
.faq-section {
    padding: 5rem 0;
}

.accordion-item {
    border: none;
    margin-bottom: 1rem;
    border-radius: var(--border-radius) !important;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.accordion-button {
    font-weight: 600;
    padding: 1.25rem;
}

.accordion-button:not(.collapsed) {
    color: var(--primary-dark);
    background-color: rgba(45, 212, 191, 0.1);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(45, 212, 191, 0.25);
}

/* CTA section */
.cta-section {
    background-color: rgba(45, 212, 191, 0.1);
}

/* Footer */
.footer {
    background-color: #1a202c;
}

.footer h3, .footer h5 {
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer ul li {
    margin-bottom: 0.75rem;
}

.footer a:hover {
    color: var(--primary) !important;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    .how-to-use {
        padding: 3rem 0;
    }
    
    .faq-section {
        padding: 3rem 0;
    }
    
    .how-to-card {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.action-buttons-container {
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    border-top: 1px solid #eee;
}

.action-buttons-container .btn {
    font-weight: 500;
    padding: 0.75rem 0;
}

/* กำหนดสีของปุ่มแต่ละประเภท */
.action-buttons-container .btn-success {
    background-color: #38b2ac;
    border-color: #38b2ac;
}

.action-buttons-container .btn-success:hover {
    background-color: #2c9a95;
    border-color: #2c9a95;
}

.action-buttons-container .btn-info {
    background-color: #4299e1;
    border-color: #4299e1;
}

.action-buttons-container .btn-info:hover {
    background-color: #3182ce;
    border-color: #3182ce;
}

.action-buttons-container .btn-warning {
    background-color: #f6ad55;
    border-color: #f6ad55;
    color: #1a202c;
}

.action-buttons-container .btn-warning:hover {
    background-color: #ed8936;
    border-color: #ed8936;
}

/* เอาส่วน share-container เดิมออก */
.share-container {
    display: none;
}

/* ปรับแต่งสำหรับมือถือ */
@media (max-width: 576px) {
    .action-buttons-container {
        padding: 0.75rem;
    }
    
    .action-buttons-container .btn {
        font-size: 0.9rem;
        padding: 0.6rem 0;
    }
    
    .action-buttons-container .btn i {
        margin-right: 0.25rem !important;
    }
}

.selling-points {
    background-color: #f8fafc;
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.benefit-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 2rem 1.5rem;
    height: 100%;
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.benefit-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.benefit-card:hover .benefit-icon {
    transform: scale(1.1);
}

.benefit-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    transition: transform 0.3s;
}

.benefit-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.benefit-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 0;
}

/* ไอคอนแต่ละประเภท */
.privacy-icon {
    background-color: #EFF6FF;
    color: #3B82F6;
}

.free-icon {
    background-color: #ECFDF5;
    color: #10B981;
}

.instant-icon {
    background-color: #FEF3C7;
    color: #F59E0B;
}

.complex-icon {
    background-color: #F3F4F6;
    color: #4B5563;
}

.qr-icon {
    background-color: #FFFBEB;
    color: #D97706;
}

.share-icon {
    background-color: #EFF6FF;
    color: #2563EB;
}

.language-icon {
    background-color: #F5F3FF;
    color: #7C3AED;
}

.history-icon {
    background-color: #FEE2E2;
    color: #EF4444;
}

/* Responsive */
@media (max-width: 768px) {
    .selling-points {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .benefit-card {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
    }
    
    .benefit-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .benefit-card h3 {
        font-size: 1.1rem;
    }
    
    .benefit-card p {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
  .item-card .item-title .row {
    display: flex;
    flex-direction: column;
  }
  
  .item-card .item-title .item-info-row {
    display: flex;
    width: 100%;
    margin-bottom: 8px;
  }
  
  .item-card .item-title .item-price-row {
    display: flex;
    width: 100%;
    justify-content: space-between;
  }
}

/* ปรับปรุงหน้าตาของรายการสินค้า */
.item-card {
    background-color: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
  }
  
  .item-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transform: translateY(-2px);
  }
  
  .item-card .item-name {
    font-size: 1.1rem;
    font-weight: 500;
  }
  
  .remove-item {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
  }
  
  .remove-item:hover {
    background-color: #f87171;
    color: white;
    border-color: #f87171;
  }
  
  /* สไตล์สำหรับช่องกรอกข้อมูลราคา */
  .item-card .form-label.small {
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
    color: #6b7280;
  }
  
  .item-card .input-group-text {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
  }
  
  .item-card .item-price, 
  .item-card .item-quantity, 
  .item-card .item-total {
    text-align: right;
    font-weight: 500;
  }
  
  .item-card .item-total {
    background-color: rgba(45, 212, 191, 0.1);
    font-weight: 700;
    color: var(--primary-dark);
  }
  
  /* สไตล์สำหรับบิลย่อยแต่ละคน */
  .individual-bills-section {
    margin-top: 40px;
    border-top: 2px dashed #e2e8f0;
    padding-top: 30px;
  }
  
  .individual-bills-section h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--primary-dark);
    font-weight: 600;
  }
  
  .individual-bill {
    background-color: #ffffff;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
  }
  
  .individual-bill:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transform: translateY(-3px);
  }
  
  .individual-bill .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
  }
  
  .individual-bill h3 {
    margin: 0;
    color: var(--primary-dark);
    font-weight: 600;
  }
  
  .individual-bill .total-display {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 20px 0;
    padding: 12px;
    background-color: rgba(45, 212, 191, 0.1);
    border-radius: 10px;
    color: var(--primary-dark);
  }

  .individual-bill .participant-item-name {
    color: #0f7290;
  }

  .individual-bill .qr-info {
    color: #0f7290;
  }
  
  .individual-bill .qr-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
  }
  
  .individual-bill .qr-container {
    width: 150px;
    height: 150px;
    padding: 8px;
    border: 2px solid #e2e8f0;
    background-color: white;
    border-radius: 8px;
  }
  
  .individual-bill .qr-info {
    flex: 1;
    padding-left: 20px;
  }
  
  .individual-bill .qr-info p {
    margin-bottom: 8px;
    font-size: 0.95rem;
  }
  
  .individual-bill-actions {
    margin-top: 15px;
  }
  
  .individual-bill-actions .btn {
    font-weight: 500;
    padding: 10px 0;
    border-radius: 8px;
    transition: all 0.3s;
  }
  
  .individual-bill-actions .btn-success {
    background-color: #10b981;
    border-color: #10b981;
  }
  
  .individual-bill-actions .btn-success:hover {
    background-color: #059669;
    border-color: #059669;
  }
  
  .individual-bill-actions .btn-primary {
    background-color: #3b82f6;
    border-color: #3b82f6;
  }
  
  .individual-bill-actions .btn-primary:hover {
    background-color: #2563eb;
    border-color: #2563eb;
  }
  
  /* ปรับการแสดงผลสำหรับมือถือ */
@media (max-width: 576px) {
    .item-card {
      padding: 15px;
    }
    
    .individual-bill {
      padding: 15px;
    }
    
    .individual-bill .qr-section {
      flex-direction: column;
      align-items: center;
    }
    
    .individual-bill .qr-info {
      padding-left: 0;
      padding-top: 15px;
      text-align: center;
      width: 100%;
    }
    
    .individual-bill .qr-container {
      margin: 0 auto;
    }
    
    .individual-bill-actions .btn {
      padding: 8px 0;
      font-size: 0.9rem;
    }
}

/* สไตล์สำหรับรายการในบิลรายบุคคล */
.participant-items-section {
    margin: 15px 0;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
  }
  
  .participant-items-title {
    background-color: rgba(45, 212, 191, 0.1);
    padding: 10px 15px;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-dark);
    border-bottom: 1px solid #e5e7eb;
  }
  
  .participant-items-list {
    padding: 10px;
    background-color: #fff;
  }
  
  .participant-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .participant-item-row:last-child {
    border-bottom: none;
  }
  
  .participant-item-row:hover {
    background-color: #f9fafb;
  }
  
  .participant-item-name {
    flex: 1;
    font-size: 0.95rem;
  }
  
  .participant-item-share {
    font-weight: 600;
    color: var(--primary-dark);
    text-align: right;
    padding-left: 10px;
  }
  
  /* สไตล์สำหรับเวอร์ชันมือถือ */
  @media (max-width: 576px) {
    .participant-items-title {
      font-size: 1rem;
      padding: 8px 12px;
    }
    
    .participant-item-row {
      padding: 6px 10px;
    }
    
    .participant-item-name {
      font-size: 0.9rem;
    }
  }
  /* CSS สำหรับบิลที่แชร์ */
.shared-bill-section {
    margin-top: 40px;
    border-top: 2px dashed #e2e8f0;
    padding-top: 30px;
    color: var(--text-dark);
    background-color: #ffffff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
  }
  
  .shared-bill-section h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 1.8rem;
  }
  
  .shared-bill-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 25px;
  }
  
  .shared-bill-card .bill-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background-color: #f8fafc;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
  }
  
  .shared-bill-card .bill-title h3 {
    margin: 0;
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 1.5rem;
  }
  
  .shared-bill-card .bill-date {
    color: var(--text-light);
    margin-top: 5px;
  }
  
  .shared-bill-card .bill-total {
    text-align: right;
  }
  
  .shared-bill-card .total-label {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 5px;
  }
  
  .shared-bill-card .total-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-dark);
  }
  
  .shared-bill-items, .shared-bill-shares, .shared-bill-payment {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
  }
  
  .shared-bill-section h4 {
    margin: 0 0 15px 0;
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 1.2rem;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
  }
  
  .items-table, .shares-table {
    width: 100%;
    border-collapse: collapse;
  }
  
  .items-table .header-row {
    background-color: #f1f5f9;
    font-weight: 600;
  }
  
  .item-row {
    display: flex;
    padding: 10px 15px;
    border-bottom: 1px solid #f1f5f9;
  }
  
  .item-row:last-child {
    border-bottom: none;
  }
  
  .item-row.header-row {
    background-color: rgba(45, 212, 191, 0.1);
    font-weight: 600;
    border-radius: 6px;
  }
  
  .item-row.extra-row {
    background-color: #f9fafb;
  }
  
  .item-row.total-row {
    font-weight: 700;
    background-color: #f1f5f9;
    border-radius: 6px;
    margin-top: 10px;
  }
  
  .item-name {
    flex: 2;
  }
  
  .item-qty, .item-price {
    flex: 1;
    text-align: right;
  }
  
  .item-total {
    flex: 1;
    text-align: right;
    font-weight: 600;
  }
  
  .share-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    border-bottom: 1px solid #f1f5f9;
  }
  
  .share-row:last-child {
    border-bottom: none;
  }
  
  .participant-name {
    font-weight: 500;
  }
  
  .participant-share {
    font-weight: 700;
    color: var(--primary-dark);
  }
  
  .payment-info {
    display: flex;
    align-items: center;
    background-color: #f9fafb;
    padding: 20px;
    border-radius: 8px;
  }
  
  .qr-container {
    flex-shrink: 0;
    width: 180px;
    height: 180px;
    background-color: white;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-right: 20px;
  }
  
  .recipient-info {
    flex: 1;
  }
  
  .recipient-info p {
    margin-bottom: 10px;
    font-size: 1.1rem;
  }
  
  .shared-bill-actions {
    padding: 20px;
  }
  
  .shared-bill-actions .btn {
    padding: 12px 0;
    font-weight: 500;
    font-size: 1.1rem;
  }
  
  /* CSS สำหรับ Business Template */
  .business-template {
    font-family: 'Noto Sans Thai', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    color: #333333;
  }
  
  .business-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
  }
  
  .business-wrapper .header {
    margin-bottom: 30px;
  }
  
  .business-wrapper .header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
  }
  
  .business-wrapper .logo-section {
    display: flex;
    align-items: center;
  }
  
  .business-wrapper .logo {
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1.5rem;
    margin-right: 10px;
  }
  
  .business-wrapper .company-name {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-dark);
  }
  
  .business-wrapper .bill-info {
    text-align: right;
  }
  
  .business-wrapper h1.bill-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0 0 10px 0;
    text-transform: uppercase;
  }
  
  .business-wrapper .bill-number {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 5px;
  }
  
  .business-wrapper .bill-date {
    color: var(--text-light);
  }
  
  .business-wrapper .bill-details {
    background-color: #f8fafc;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid var(--primary);
  }
  
  .business-wrapper .bill-details h2 {
    margin: 0 0 15px 0;
    font-size: 1.4rem;
    color: #333333;
  }
  
  .business-wrapper .bill-summary {
    display: flex;
    justify-content: space-between;
  }
  
  .business-wrapper .summary-item {
    text-align: center;
    padding: 10px 15px;
    background-color: white;
    border-radius: 8px;
    flex: 1;
    margin: 0 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  }
  
  .business-wrapper .summary-item .label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 5px;
  }
  
  .business-wrapper .summary-item .value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-dark);
  }
  
  .business-wrapper .summary-item.total {
    background-color: var(--primary);
  }
  
  .business-wrapper .summary-item.total .label,
  .business-wrapper .summary-item.total .value {
    color: white;
  }
  
  .business-wrapper .content {
    margin-top: 30px;
  }
  
  .business-wrapper .section-title {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: var(--primary-dark);
    font-size: 1.3rem;
    font-weight: 600;
  }
  
  .business-wrapper .section-title i {
    margin-right: 10px;
    color: var(--primary);
  }
  
  .business-wrapper .items-table,
  .business-wrapper .shares-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    font-size: 0.95rem;
  }
  
  .business-wrapper table th,
  .business-wrapper table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
  }
  
  .business-wrapper table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: var(--primary-dark);
  }
  
  .business-wrapper .text-center {
    text-align: center;
  }
  
  .business-wrapper .text-right {
    text-align: right;
  }
  
  .business-wrapper table tfoot tr {
    background-color: #f9fafb;
  }
  
  .business-wrapper table tfoot tr.subtotal {
    font-weight: 600;
  }
  
  .business-wrapper table tfoot tr.grand-total {
    font-weight: 700;
    color: var(--primary-dark);
    background-color: rgba(45, 212, 191, 0.1);
  }
  
  .business-wrapper .payment-section {
    margin-top: 30px;
    margin-bottom: 30px;
  }
  
  .business-wrapper .payment-details {
    display: flex;
    background-color: #f8fafc;
    padding: 20px;
    border-radius: 10px;
  }
  
  .business-wrapper .payment-info {
    flex: 1;
    margin-left: 20px;
  }
  
  .business-wrapper .info-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
  }
  
  .business-wrapper .info-label {
    width: 150px;
    font-weight: 500;
    color: var(--text-light);
  }
  
  .business-wrapper .info-value {
    flex: 1;
    font-weight: 600;
  }
  
  .business-wrapper .info-row.total {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #e5e7eb;
  }
  
  .business-wrapper .info-row.total .info-label,
  .business-wrapper .info-row.total .info-value {
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 1.2rem;
  }
  
  .business-wrapper .remarks-section {
    margin-top: 30px;
    background-color: #f9fafb;
    padding: 20px;
    border-radius: 10px;
    border-left: 3px solid var(--accent);
  }
  
  .business-wrapper .remarks-content {
    line-height: 1.6;
    color: #4b5563;
  }
  
  .business-wrapper .footer {
    margin-top: 40px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
  }
  
  .business-wrapper .powered-by {
    margin-bottom: 5px;
  }
  
  /* ปรับปรุง Modern Template */
  .modern-template {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  }
  
  .modern-template .header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
  }
  
  .modern-template .header:after {
    content: '';
    position: absolute;
    width: 80px;
    height: 3px;
    background: rgba(255,255,255,0.5);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
  }
  
  .modern-template .header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }
  
  .modern-template .header .date {
    opacity: 0.9;
    font-size: 1.1rem;
  }
  
  .modern-template .qr-container {
    background-color: white;
    padding: 1.2rem;
    border-radius: 12px;
    margin: 0 auto 2rem;
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border: 5px solid rgba(255,255,255,0.2);
  }
  
  .modern-template .total-amount {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  }
  
  .modern-template .total-amount h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    opacity: 0.95;
    font-weight: 500;
  }
  
  .modern-template .total-amount .amount {
    font-size: 2.8rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
  }
  
  .modern-template .items, 
  .modern-template .participants {
    background-color: rgba(255, 255, 255, 0.15);
    padding: 1.8rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    backdrop-filter: blur(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  }
  
  .modern-template .section-title {
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 1.2rem;
  }
  
  .modern-template .section-title i {
    margin-right: 0.75rem;
    font-size: 1.3rem;
    background: rgba(255,255,255,0.2);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
  }
  
  .modern-template .item-row, 
  .modern-template .participant-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  }
  
  .modern-template .item-row:last-child, 
  .modern-template .participant-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
  }
  
  .modern-template .item-name, 
  .modern-template .participant-name {
    font-weight: 500;
  }
  
  .modern-template .item-price, 
  .modern-template .participant-share {
    font-weight: 700;
  }
  
  .modern-template .item-info, 
  .modern-template .participant-info {
    display: flex;
    flex-direction: column;
  }
  
  .modern-template .item-meta {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 3px;
  }
  
  .modern-template .footer {
    text-align: center;
    margin-top: 2.5rem;
    opacity: 0.9;
    font-size: 0.9rem;
  }
  
  /* ปรับปรุง Colorful Template */
  .colorful-template {
    background: linear-gradient(135deg, var(--colorful-grad1) 0%, var(--colorful-grad2) 50%, var(--colorful-grad3) 100%);
    padding: 2.5rem;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
    font-family: 'Noto Sans Thai', 'Quicksand', sans-serif;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  }
  
  .colorful-wrapper {
    padding: 0;
  }
  
  .colorful-template .header {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
  }
  
  .colorful-template .header:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 3px;
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
  }
  
  .colorful-template .header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    background: linear-gradient(90deg, #fff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  }
  
  .colorful-template .date {
    color: rgba(255,255,255,0.85);
    font-size: 1.1rem;
  }
  
  .colorful-template .qr-container {
    background-color: white;
    padding: 1.2rem;
    border-radius: 15px;
    margin: 0 auto 2.5rem;
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
  }
  
  .rainbow-border {
    position: relative;
  }
  
  .rainbow-border::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 20px;
    background: linear-gradient(45deg, #ff0000, #ff8000, #ffff00, #80ff00, #00ff00, #00ff80, #00ffff, #0080ff, #0000ff, #8000ff, #ff00ff, #ff0080);
    z-index: -1;
    animation: rainbow 10s linear infinite;
    opacity: 0.85;
    filter: blur(3px);
  }
  
  @keyframes rainbow {
    0% { background-position: 0% 0%; }
    100% { background-position: 300% 0%; }
  }
  
  .colorful-template .total-amount-colorful {
    background-color: rgba(255,255,255,0.2);
    text-align: center;
    padding: 1.8rem;
    border-radius: 15px;
    margin-bottom: 2.5rem;
    backdrop-filter: blur(5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  }
  
  .colorful-template .amount-label {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    opacity: 0.9;
  }
  
  .colorful-template .amount-value {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(90deg, #fff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.25));
  }
  
  .colorful-template .section {
    margin-bottom: 2rem;
    border-radius: 15px;
    padding: 1.8rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
  }
  
  .colorful-template .items-section {
    background-color: rgba(255,255,255,0.25);
    backdrop-filter: blur(8px);
  }
  
  .colorful-template .participants-section {
    background-color: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
  }
  
  .colorful-template .section-title {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    padding-bottom: 1rem;
    display: flex;
    align-items: center;
    font-size: 1.4rem;
    font-weight: 600;
    color: white;
  }
  
  .colorful-template .section-title i {
    margin-right: 1rem;
    font-size: 1.5rem;
    background: rgba(255,255,255,0.2);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
  }
  
  .colorful-template .participant-row,
  .colorful-template .item-row {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    margin-bottom: 0.75rem;
    border-radius: 10px;
    background-color: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    transition: all 0.3s;
  }
  
  .colorful-template .participant-row:hover,
  .colorful-template .item-row:hover {
    transform: translateX(5px);
    background-color: rgba(255,255,255,0.2);
  }
  
  .colorful-template .participant-name,
  .colorful-template .item-name {
    font-weight: 500;
  }
  
  .colorful-template .participant-share,
  .colorful-template .item-price {
    font-weight: 700;
  }
  
  .colorful-template .footer {
    text-align: center;
    margin-top: 3rem;
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
  }
  
  .colorful-template .item-info {
    display: flex;
    flex-direction: column;
  }
  
  .colorful-template .item-meta {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 3px;
  }
  
  /* ปรับปรุงสำหรับมือถือ */
  @media (max-width: 576px) {
    .shared-bill-section h2 {
      font-size: 1.5rem;
    }
    
    .shared-bill-card .bill-header {
      flex-direction: column;
      text-align: center;
    }
    
    .shared-bill-card .bill-total {
      text-align: center;
      margin-top: 15px;
    }
    
    .payment-info {
      flex-direction: column;
      align-items: center;
    }
    
    .qr-container {
      width: 150px;
      height: 150px;
      margin-right: 0;
      margin-bottom: 15px;
    }
    
    .recipient-info {
      text-align: center;
    }
    
    .business-wrapper {
      padding: 15px;
    }
    
    .business-wrapper .header-row {
      flex-direction: column;
      align-items: center;
      text-align: center;
    }
    
    .business-wrapper .bill-info {
      text-align: center;
      margin-top: 15px;
    }
    
    .business-wrapper .bill-summary {
      flex-direction: column;
    }
    
    .business-wrapper .summary-item {
      margin: 5px 0;
    }
    
    .business-wrapper .payment-details {
      flex-direction: column;
      align-items: center;
    }
    
    .business-wrapper .payment-info {
      margin-left: 0;
      margin-top: 15px;
      width: 100%;
    }
    
    .business-wrapper .info-row {
      flex-direction: column;
      text-align: center;
    }
    
    .business-wrapper .info-label {
      width: 100%;
      margin-bottom: 5px;
    }
    
    .modern-template,
    .colorful-template {
      padding: 1.5rem;
    }
    
    .modern-template .qr-container,
    .colorful-template .qr-container {
      width: 180px;
      height: 180px;
    }
    
    .modern-template .total-amount .amount,
    .colorful-template .amount-value {
      font-size: 2rem;
    }
  }
  
.business-preview {
    background: linear-gradient(to bottom, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.business-preview::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    height: 30px;
    background-color: #f1f5f9;
}

.business-preview::after {
    content: '';
    position: absolute;
    top: 70px;
    left: 20px;
    right: 20px;
    height: 80px;
    background-color: #e2e8f0;
    border-radius: 5px;
}

/* CSS สำหรับส่วนบิลแยกรายบุคคล */
.individual-bills-section {
    margin-top: 40px;
    border-top: 2px dashed #e2e8f0;
    padding-top: 30px;
  }
  
  .individual-bills-section h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 1.8rem;
  }
  
  .individual-bill-container {
    margin-bottom: 40px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-radius: var(--border-radius);
    overflow: hidden;
  }
  
  .individual-bill-title {
    background-color: var(--primary-dark);
    color: white;
    padding: 15px 20px;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .individual-bill-title .participant-name {
    font-size: 1.3rem;
    font-weight: 600;
  }
  
  .individual-bill-title .participant-share {
    font-weight: 700;
    font-size: 1.2rem;
    background-color: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 8px;
  }
  
  .individual-bill-content {
    background-color: #ffffff;
  }
  
  .individual-bill-actions {
    background-color: #f8fafc;
    padding: 15px;
    border-top: 1px solid #e2e8f0;
  }
  
  .individual-bill-actions .btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 10px 0;
  }
  
  /* ปรับแต่ง templates แต่ละแบบเมื่ออยู่ในบิลย่อย */
  .individual-modern-template,
  .individual-colorful-template,
  .individual-cute-template,
  .individual-casual-template,
  .individual-minimalist-template,
  .individual-business-template {
    box-shadow: none;
    border-radius: 0;
  }
  
  /* Modern Template ในบิลย่อย */
  .individual-modern-template {
    padding: 20px;
  }
  
  .individual-modern-template .header {
    text-align: center;
    margin-bottom: 20px;
  }
  
  .individual-modern-template .header h2 {
    font-size: 1.6rem;
    margin-bottom: 5px;
  }
  
  .individual-modern-template .qr-container {
    width: 180px;
    height: 180px;
    margin: 0 auto 20px;
  }
  
  .individual-modern-template .total-amount {
    margin-bottom: 20px;
  }
  
  .individual-modern-template .total-amount .amount {
    font-size: 2.2rem;
  }
  
  .individual-modern-template .items {
    margin-bottom: 20px;
  }
  
  /* Casual Template ในบิลย่อย */
  .individual-casual-template {
    padding: 20px;
  }
  
  .individual-casual-template .header {
    margin-bottom: 20px;
  }
  
  .individual-casual-template .qr-section {
    margin: 20px 0;
  }
  
  .individual-casual-template .qr-container {
    width: 150px;
    height: 150px;
  }
  
  /* Cute Template ในบิลย่อย */
  .individual-cute-template {
    padding: 20px;
  }
  
  .individual-cute-template .header {
    text-align: center;
    margin-bottom: 20px;
  }
  
  .individual-cute-template .header h2 {
    font-size: 1.6rem;
  }
  
  .individual-cute-template .qr-container {
    width: 180px;
    height: 180px;
    margin: 0 auto 20px;
  }
  
  .individual-cute-template .section {
    margin-bottom: 20px;
  }
  
  /* Minimalist Template ในบิลย่อย */
  .individual-minimalist-template {
    padding: 20px;
  }
  
  .individual-minimalist-template .minimalist-wrapper {
    padding: 0;
  }
  
  .individual-minimalist-template .header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--minimalist-border);
  }
  
  .individual-minimalist-template .total-section {
    margin-bottom: 20px;
  }
  
  .individual-minimalist-template .qr-section {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
  }
  
  .individual-minimalist-template .qr-container {
    width: 150px;
    height: 150px;
  }
  
  /* Colorful Template ในบิลย่อย */
  .individual-colorful-template {
    padding: 20px;
  }
  
  .individual-colorful-template .colorful-wrapper {
    padding: 0;
  }
  
  .individual-colorful-template .header {
    text-align: center;
    margin-bottom: 20px;
  }
  
  .individual-colorful-template .header h2 {
    font-size: 1.8rem;
  }
  
  .individual-colorful-template .qr-container {
    width: 180px;
    height: 180px;
    margin: 0 auto 20px;
  }
  
  .individual-colorful-template .section {
    margin-bottom: 20px;
  }
  
  /* Business Template ในบิลย่อย */
  .individual-business-template {
    padding: 0;
  }
  
  .individual-business-template .business-wrapper {
    padding: 20px;
  }
  
  .individual-business-template .header {
    margin-bottom: 20px;
  }
  
  .individual-business-template .bill-details {
    padding: 15px;
  }
  
  .individual-business-template .bill-details h2 {
    font-size: 1.3rem;
  }
  
  .individual-business-template .content {
    margin-top: 20px;
  }
  
  .individual-business-template .section-title {
    margin-bottom: 15px;
  }
  
  .individual-business-template .items-table {
    margin-bottom: 20px;
  }
  
  .individual-business-template .payment-details {
    padding: 15px;
  }
  
  .individual-business-template .qr-container {
    width: 150px;
    height: 150px;
  }
  
  .individual-business-template .footer {
    margin-top: 20px;
  }
  
  /* รองรับการแสดงผลบนมือถือ */
  @media (max-width: 576px) {
    .individual-bill-title {
      flex-direction: column;
      align-items: flex-start;
      padding: 12px 15px;
    }
    
    .individual-bill-title .participant-share {
      margin-top: 5px;
    }
    
    .individual-modern-template,
    .individual-colorful-template,
    .individual-cute-template,
    .individual-casual-template,
    .individual-minimalist-template,
    .individual-business-template {
      padding: 15px;
    }
    
    .individual-casual-template .header {
      flex-direction: column;
    }
    
    .individual-casual-template .header-right {
      margin-top: 10px;
      text-align: left;
    }
    
    .individual-business-template .header-row {
      flex-direction: column;
    }
    
    .individual-business-template .bill-info {
      margin-top: 15px;
      text-align: left;
    }
    
    .individual-business-template .bill-summary {
      flex-direction: column;
    }
    
    .individual-business-template .summary-item {
      margin: 5px 0;
    }
    
    .individual-business-template .payment-details {
      flex-direction: column;
    }
    
    .individual-business-template .payment-info {
      margin-top: 15px;
      margin-left: 0;
    }
    
    .individual-business-template .qr-section {
      justify-content: center;
    }
    
    .individual-business-template .info-row {
      flex-direction: column;
      align-items: flex-start;
    }
    
    .individual-business-template .info-label {
      margin-bottom: 5px;
    }
    
    .individual-modern-template .qr-container,
    .individual-colorful-template .qr-container,
    .individual-cute-template .qr-container {
      width: 150px;
      height: 150px;
    }
  }

/* CSS สำหรับคอนเทนเนอร์ของบิลรายบุคคล */
.bills-container {
    padding: 20px 0;
  }
  
  .individual-bills-container {
    max-width: 800px;
    margin: 0 auto;
  }
  
  .bills-header {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 2rem;
    position: relative;
    padding-bottom: 10px;
  }
  
  .bills-header:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary);
    border-radius: 3px;
  }
  
  .no-bills-message {
    text-align: center;
    padding: 40px 20px;
    background-color: #f9fafb;
    border-radius: 12px;
    color: var(--text-light);
  }
  
  .no-bills-message i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 15px;
  }
  
  .no-bills-message p {
    font-size: 1.2rem;
  }
  
  .individual-bill-container {
    margin-bottom: 40px;
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
  }
  
  .individual-bill-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
  }
  
  .individual-bill-title {
    background-color: var(--primary-dark);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .individual-bill-title .participant-name {
    font-size: 1.3rem;
    font-weight: 600;
  }
  
  .individual-bill-title .participant-share {
    font-weight: 700;
    font-size: 1.2rem;
    background-color: rgba(255,255,255,0.2);
    padding: 5px 12px;
    border-radius: 8px;
  }
  
  .individual-bill-content {
    background-color: #ffffff;
    /* Template CSS is already applied from the individual template styles */
  }
  
  .individual-bill-actions {
    background-color: #f8fafc;
    padding: 15px;
    border-top: 1px solid #e2e8f0;
  }
  
  .individual-bill-actions .btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 10px 0;
    transition: all 0.2s;
  }
  
  .individual-bill-actions .btn:hover {
    transform: translateY(-2px);
  }
  
  .individual-bill-actions .btn-success {
    background-color: #10b981;
    border-color: #10b981;
  }
  
  .individual-bill-actions .btn-success:hover {
    background-color: #059669;
    border-color: #059669;
  }
  
  .individual-bill-actions .btn-primary {
    background-color: #3b82f6;
    border-color: #3b82f6;
  }
  
  .individual-bill-actions .btn-primary:hover {
    background-color: #2563eb;
    border-color: #2563eb;
  }
  
  /* ธีมสีสำหรับแต่ละเทมเพลต */
  .modern-theme .individual-bill-title {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  }
  
  .casual-theme .individual-bill-title {
    background-color: var(--primary-dark);
  }
  
  .cute-theme .individual-bill-title {
    background: linear-gradient(135deg, #fbcfe8 0%, #fecdd3 100%);
    color: #9d174d;
  }
  
  .cute-theme .individual-bill-title .participant-share {
    background-color: rgba(157, 23, 77, 0.2);
    color: #9d174d;
  }
  
  .minimalist-theme .individual-bill-title {
    background-color: var(--minimalist-bg);
    color: var(--minimalist-accent);
    border-bottom: 1px solid var(--minimalist-border);
  }
  
  .minimalist-theme .individual-bill-title .participant-share {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--minimalist-accent);
  }
  
  .colorful-theme .individual-bill-title {
    background: linear-gradient(135deg, var(--colorful-grad1) 0%, var(--colorful-grad2) 50%, var(--colorful-grad3) 100%);
  }
  
  .business-theme .individual-bill-title {
    background-color: #1e3a8a;
  }
  
  /* รองรับการแสดงผลบนมือถือ */
  @media (max-width: 576px) {
    .bills-header {
      font-size: 1.5rem;
      margin-bottom: 20px;
    }
    
    .individual-bill-title {
      flex-direction: column;
      align-items: flex-start;
      padding: 12px 15px;
    }
    
    .individual-bill-title .participant-share {
      margin-top: 5px;
      align-self: flex-start;
    }
  }