

/* Contract Generator Hero Section */
.contract-generator-hero {
   
    background: #ffffff;
    text-align: center;
}

.contract-generator-hero .container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-content {
    display: flex;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-direction: column;

}
.hero-content-2 {
    display: flex;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-direction: row;

}

.hero-text-column {
    flex: 1;
}

.hero-subtitle-column {
    flex: 1;
}

.hero-main-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #374151;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

/* Highlight words base styles */
.hero-main-title .highlight-word {
    position: relative;
    font-weight: 800;
    display: inline-block;
}

/* Blue gradient for Crypto and Transactions */
.hero-main-title .highlight-blue {
    background: linear-gradient(135deg, #527bf2   0%, var(--primary-blue) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-main-title .highlight-blue::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, #000000 100%);
    border-radius: 2px;
    opacity: 0.7;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.hero-main-title .highlight-blue:hover::after {
    transform: scaleX(1);
}

/* Gold gradient for Legal, Contracts, Instantly */
.hero-main-title .highlight-gold {
    background: linear-gradient(135deg, var(--primary-gold) 0%, #b8941f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-main-title .highlight-gold::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-gold) 0%, #b8941f 100%);
    border-radius: 2px;
    opacity: 0.7;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.hero-main-title .highlight-gold:hover::after {
    transform: scaleX(1);
}

.hero-main-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

/* Contract Form Card */
.contract-form-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-card-header {
    margin-bottom: 1.5rem;
}

.form-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.5rem 0;
}

.form-card-subtitle {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.contract-form {
    text-align: left;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

.cgcg-input-container {
    position: relative;
}

.cgcg-input-container input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    background: #ffffff;
    transition: border-color 0.2s ease;
}

.cgcg-input-container input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-contract {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-contract:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.btn-icon {
    font-size: 1.125rem;
}

/* Supported Blockchains */
.supported-blockchains {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.supported-label {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
    font-weight: 500;
}

.blockchain-icons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.blockchain-icon-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.blockchain-icon-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 4px;
}

.blockchain-icon-symbol {
    font-size: 1rem;
    color: #6b7280;
}

.blockchain-icon-name {
    font-size: 0.875rem;
    color: #374151;
    font-weight: 600;
}

.blockchain-separator {
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Feature icons styling - increase SVG icon size */
.feature-icon .dropdown-icon {
    width: 48px;
    height: 48px;
    stroke: currentColor;
    color: #6b7280;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content, .hero-content-2 {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .hero-main-title {
        font-size: 2rem;
    }
    
    .contract-form-card {
        padding: 1.5rem;
    }
    
    .supported-blockchains {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .blockchain-icons {
        justify-content: center;
    }
}

/* Legacy form styles for backward compatibility */
form[action] label{display:block;margin:0 0 6px 0;font-weight:600;color:var(--text-dark)}
form[action] input[type="text"],form[action] select{width:100%;max-width:100%;padding:12px;border:1px solid var(--border-light);border-radius:var(--radius-sm)}
form[action] div{margin-bottom:12px}

/* Input with blockchain indicator */
.cgcg-input-container{position:relative}
.cgcg-input-container input{padding-right:60px}
.cgcg-chain-indicator{position:absolute;right:8px;top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:4px;padding:4px 8px;border-radius:var(--radius-sm);font-size:var(--font-size-sm);font-weight:600;pointer-events:none}
.cgcg-chain-indicator.eth{background:#627eea;color:white}
.cgcg-chain-indicator.bsc{background:#f3ba2f;color:white}
.cgcg-chain-indicator.polygon{background:#8247e5;color:white}

/* Transaction Details Styles - Professional Design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

.cgcg-transaction-details {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    position: relative;
}

@media (max-width: 1024px) {
    .cgcg-transaction-details {
        margin-top: 60px; /* Space for warning banner */
    }
}

/* Header Section */
.cgcg-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
}

.cgcg-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 0.5rem 0;
    font-size: 1.75rem;
    font-weight: 600;
    color: #111827;
    letter-spacing: -0.025em;
}

.cgcg-icon {
    color: #6b7280;
    flex-shrink: 0;
}

.cgcg-subtitle {
    color: #6b7280;
    font-size: 1rem;
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.cgcg-chain-indicator {
    position: absolute;
    top: 0;
    right: 0;
    padding: 0.375rem 0.75rem;
    background: #f3f4f6;
    color: #374151;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Summary Section */
.cgcg-summary-section {
    margin-bottom: 2rem;
}

.cgcg-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.cgcg-summary-item {
    padding: 1.25rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.cgcg-summary-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.cgcg-summary-icon {
    color: #6b7280;
    flex-shrink: 0;
}

.cgcg-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cgcg-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.cgcg-unit {
    font-size: 0.875rem;
    font-weight: 400;
    color: #6b7280;
    margin-left: 0.25rem;
}

.cgcg-subvalue {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 400;
}

/* Status */
.cgcg-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cgcg-status-success,
.cgcg-status-1,
.cgcg-status-validated {
    background: #d1fae5;
    color: #065f46;
}

.cgcg-status-failed,
.cgcg-status-0 {
    background: #fee2e2;
    color: #991b1b;
}

.cgcg-status-pending {
    background: #fef3c7;
    color: #92400e;
}

.cgcg-status-unknown {
    background: #f3f4f6;
    color: #6b7280;
}

/* Details Section */
.cgcg-details-section {
    margin-bottom: 2rem;
}

.cgcg-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.cgcg-section-icon {
    color: #6b7280;
    flex-shrink: 0;
}

.cgcg-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.cgcg-detail-item {
    padding: 1rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.cgcg-detail-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.cgcg-detail-icon {
    color: #6b7280;
    flex-shrink: 0;
}

.cgcg-detail-full {
    grid-column: 1 / -1;
}

.cgcg-detail-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cgcg-detail-value {
    font-family: 'Inter', 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Courier New', monospace;
    font-size: 0.875rem;
    word-break: break-all;
    padding: 0.75rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    color: #374151;
    line-height: 1.5;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

.cgcg-address, .cgcg-hash {
    font-family: 'Inter', 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Courier New', monospace;
    font-size: 0.875rem;
    word-break: break-all;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

/* Actions Section */
.cgcg-actions-section {
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.cgcg-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cgcg-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    font-size: 0.875rem;
}

.cgcg-btn-icon {
    color: currentColor;
    flex-shrink: 0;
}

.cgcg-btn-secondary {
    background: #ffffff;
    color: #374151;
    border-color: #d1d5db;
}

.cgcg-btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.cgcg-btn-primary {
    background: var(--primary-blue);
    color: #ffffff;
    border-color: var(--primary-blue);
}

.cgcg-btn-primary:hover {
    background: #1e40af;
    border-color: #1e40af;
}

/* Responsive Design for Transaction Details */
@media (max-width: 768px) {
    .cgcg-transaction-details {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .cgcg-header {
        position: relative;
        padding-bottom: 1rem;
    }
    
    .cgcg-title {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .cgcg-chain-indicator {
        position: static;
        display: inline-block;
        margin-top: 0.5rem;
    }
    
    .cgcg-summary-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .cgcg-summary-item {
        padding: 1rem;
    }
    
    .cgcg-value {
        font-size: 1.125rem;
    }
    
    .cgcg-details-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .cgcg-detail-item {
        padding: 0.75rem;
    }
    
    .cgcg-detail-value {
        font-size: 0.8125rem;
        padding: 0.5rem;
    }
    
    .cgcg-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .cgcg-btn {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .cgcg-transaction-details {
        padding: 1rem;
        margin: 0.5rem;
    }
    
    .cgcg-title {
        font-size: 1.375rem;
    }
    
    .cgcg-subtitle {
        font-size: 0.9375rem;
    }
    
    .cgcg-summary-item {
        padding: 0.875rem;
    }
    
    .cgcg-value {
        font-size: 1rem;
    }
    
    .cgcg-section-title {
        font-size: 1.125rem;
    }
    
    .cgcg-detail-item {
        padding: 0.625rem;
    }
    
    .cgcg-detail-value {
        font-size: 0.75rem;
        padding: 0.5rem;
    }
}

/* Tablet specific adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .cgcg-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cgcg-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cgcg-detail-full {
        grid-column: 1 / -1;
    }
}

.cgcg-error{text-align:center;padding:var(--spacing-xl);background:#fef2f2;border:1px solid #fca5a5;border-radius:var(--radius-lg);color:#991b1b}

/* Contract Generator Styles */
.cgcg-contract-generator {
    display: flex;
    min-height: 100vh;
    background: #ffffff;
    position: relative;
}

/* Mobile Toggle Button */
.cgcg-mobile-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
    font-size: 0;
    line-height: 0;
}

.cgcg-mobile-toggle:hover {
    background: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.cgcg-mobile-toggle:active {
    transform: translateY(0);
}

.cgcg-mobile-toggle svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Mobile Warning Banner */
.cgcg-mobile-warning {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1002;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-bottom: 1px solid #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.cgcg-mobile-warning.show {
    transform: translateY(0);
}

.cgcg-warning-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    max-width: 100%;
}

.cgcg-warning-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: #d97706;
}

.cgcg-warning-icon svg {
    width: 100%;
    height: 100%;
}

.cgcg-warning-text {
    flex: 1;
    min-width: 0;
}

.cgcg-warning-text h4 {
    margin: 0 0 2px 0;
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
    line-height: 1.2;
}

.cgcg-warning-text p {
    margin: 0;
    font-size: 12px;
    color: #a16207;
    line-height: 1.3;
}

.cgcg-warning-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    color: #a16207;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cgcg-warning-close:hover {
    background: rgba(161, 98, 7, 0.1);
    color: #92400e;
}

.cgcg-warning-close svg {
    width: 16px;
    height: 16px;
}

/* Mobile Overlay */
.cgcg-mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cgcg-mobile-overlay.show {
    opacity: 1;
}

/* Sidebar */
.cgcg-sidebar {
    padding: 10px;
    min-width: 280px;
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    left: 0;
    top: 0;
    z-index: 800;
    transition: transform 0.3s ease;
}

.cgcg-sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid #e9ecef;
}

.cgcg-sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #212529;
}

.cgcg-sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.cgcg-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #6c757d;
    text-decoration: none;
    transition: all 0.2s ease;
}

.cgcg-nav-item {
    border-radius: 8px;
    margin: 4px 0;
}

.cgcg-nav-item:hover {
    background: rgba(30, 58, 138, 0.1);
    color: var(--primary-blue);
    border-radius: 8px;
}

.cgcg-nav-item.active {
    background: var(--primary-blue);
    color: white;
}

.cgcg-nav-icon {
    font-size: 16px;
}

/* Ensure clean sizing and alignment for SVG icons in sidebar */
.cgcg-nav-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.cgcg-nav-text {
    font-size: 14px;
    font-weight: 500;
}

.cgcg-sidebar-footer {
    padding: 20px;
    border-top: 1px solid #e9ecef;
}

.cgcg-user-avatar {
    width: 40px;
    height: 40px;
    background: #212529;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

/* Main Content */
.cgcg-main-content {
    flex: 1;
    padding: 40px;
}

/* Make template editor header sit flush at top and span full column width */
.cgcg-main-content.cgcg-editor-active { padding-top: 0; }
.cgcg-main-content.cgcg-editor-active .cgcg-template-header {
    margin-left: -40px;
    margin-right: -40px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
}

.cgcg-page-header {
    margin-bottom: 32px;
}

.cgcg-subtitle {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

.cgcg-content h1 {
    font-size: 32px;
    font-weight: 700;
    color: #212529;
    margin: 0 0 8px 0;
}

/* Title row with inline sort control */
.cgcg-title-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 8px 0}
.cgcg-title-row h1{margin:0}

.cgcg-description {
    color: #6c757d;
    font-size: 16px;
    margin: 0 0 40px 0;
}

/* Toolbar for sorting - clean SAAS style */
.cgcg-toolbar{display:flex;align-items:center;justify-content:space-between;margin:0 0 16px 0}
.cgcg-toolbar-spacer{flex:1}
.cgcg-sort{display:flex;align-items:center;gap:10px}
.cgcg-sort-label{font-size:13px;color:#6c757d}
.cgcg-select{appearance:none;-webkit-appearance:none;background:#fff;border:1px solid #dee2e6;border-radius:8px;padding:8px 12px 8px 12px;font-size:14px;color:#495057;cursor:pointer;transition:border-color .2s ease;min-width:180px;background-image:url('data:image/svg+xml;utf8,<svg fill="%236c757d" height="20" viewBox="0 0 24 24" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');background-repeat:no-repeat;background-position:right 8px center;background-size:16px 16px;padding-right:36px}
.cgcg-select:focus{outline:none;border-color:#6f42c1;box-shadow:0 0 0 3px rgba(111,66,193,.1)}

/* Templates Grid */
.cgcg-templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.cgcg-template-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.cgcg-template-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.cgcg-template-card.cgcg-template-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cgcg-template-card.cgcg-template-disabled:hover {
    transform: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.cgcg-template-icon{width:32px;height:32px;margin-bottom:16px}

.cgcg-template-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
    margin: 0 0 8px 0;
}

.cgcg-template-card p {
    color: #6c757d;
    font-size: 14px;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

/* Variant count badge */
.cgcg-variant-count {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
}

.cgcg-variant-badge {
    display: inline-block;
    background: #1e3a8a;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(30, 58, 138, 0.2);
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cgcg-template-card:hover .cgcg-variant-badge {
    background: #1e40af;
    transform: scale(1.05);
    box-shadow: 0 3px 6px rgba(30, 58, 138, 0.3);
}

/* Equal height cards: push actions to bottom */
.cgcg-template-card .cgcg-template-actions{margin-top:auto}
.cgcg-template-card > .btn{margin-top:auto}

/* A4 Preview */
.cgcg-template-preview {
    margin-bottom: 20px;
}

.cgcg-a4-page {
    width: 100%;
    height: 200px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.cgcg-page-content {
    height: 100%;
    font-size: 10px;
    line-height: 1.3;
}

.cgcg-contract-header h4 {
    margin: 0 0 12px 0;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    color: #212529;
}

.cgcg-contract-body p {
    margin: 0 0 4px 0;
    font-size: 9px;
    color: #495057;
}

/* Coming Soon */
.cgcg-coming-soon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    margin-top: 20px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cgcg-coming-soon::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.5s ease;
}

.cgcg-template-card:hover .cgcg-coming-soon {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cgcg-template-card:hover .cgcg-coming-soon::before {
    left: 100%;
}

.cgcg-clock-icon {
    font-size: 16px;
    opacity: 0.8;
}

/* Your Templates */
.cgcg-your-templates {
    margin-top: 40px;
}

.cgcg-your-templates h2 {
    font-size: 24px;
    font-weight: 600;
    color: #212529;
    margin: 0 0 24px 0;
}

.cgcg-empty-template {
    text-align: center;
    padding: 40px 24px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
}

.cgcg-template-count {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #6c757d;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.cgcg-empty-template .cgcg-template-icon {
    margin-bottom: 12px;
}

.cgcg-empty-template p {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

/* Empty State */
.cgcg-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

.cgcg-empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.6;
}

.cgcg-empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: #495057;
    margin: 0 0 12px 0;
}

.cgcg-empty-state p {
    color: #6c757d;
    font-size: 16px;
    margin: 0;
    line-height: 1.5;
}

/* Template Meta */
.cgcg-template-meta {
    margin: 12px 0 16px 0;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
}

.cgcg-template-meta small {
    color: #6c757d;
    font-size: 12px;
}

/* Template Actions */
.cgcg-template-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.cgcg-template-actions .btn {
    flex: 1;
    font-size: 14px;
    padding: 8px 12px;
}

.btn-danger {
    background-color: #000000;
    border-color: #000000;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
    color: white;
}

/* Delete Confirmation Modal */
.cgcg-delete-modal {
    max-width: 520px;
}

.cgcg-delete-warning {
    text-align: center;
    padding: 16px 0 8px;
}

.cgcg-warning-icon {
    font-size: 44px;
    margin-bottom: 12px;
    opacity: 0.85;
}

.cgcg-delete-warning h3 {
    font-size: 20px;
    font-weight: 600;
    color: #dc3545;
    margin: 0 0 8px 0;
}

.cgcg-delete-warning p {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 6px 0;
}

.cgcg-delete-warning p:last-child {
    margin-bottom: 0;
    font-weight: 500;
    color: #495057;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .cgcg-contract-generator {
        flex-direction: column;
    }
    
    .cgcg-mobile-warning {
        display: block;
    }
    
    .cgcg-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 280px;
        transform: translateX(-100%);
        z-index: 1000;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .cgcg-sidebar.show {
        transform: translateX(0);
    }
    
    .cgcg-mobile-toggle {
        display: block;
        top: 60px; /* Adjust for warning banner */
    }
    
    .cgcg-mobile-overlay {
        display: block;
    }
    
    .cgcg-main-content {
        width: 100%;
        padding: 20px;
        margin-left: 0;
        margin-top: 60px; /* Space for warning banner */
    }
    
    .cgcg-templates-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 16px;
    }
    
    .cgcg-template-card {
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .cgcg-mobile-toggle {
        top: 15px;
        left: 15px;
        padding: 10px;
    }
    
    .cgcg-sidebar {
        width: 100%;
        max-width: 320px;
    }
    
    .cgcg-main-content {
        padding: 15px;
    }
    
    .cgcg-templates-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .cgcg-template-card {
        padding: 12px;
    }
    
    .cgcg-template-card h3 {
        font-size: 16px;
    }
    
    .cgcg-template-card p {
        font-size: 13px;
    }
    
    .cgcg-page-header h1 {
        font-size: 24px;
    }
    
    .cgcg-description {
        font-size: 14px;
    }
    
    .cgcg-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .cgcg-sort {
        width: 100%;
    }
    
    .cgcg-select {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .cgcg-main-content {
        padding: 10px;
    }
    
    .cgcg-template-card {
        padding: 10px;
    }
    
    .cgcg-template-card h3 {
        font-size: 15px;
    }
    
    .cgcg-template-card p {
        font-size: 12px;
    }
    
    .cgcg-page-header h1 {
        font-size: 20px;
    }
    
    .cgcg-description {
        font-size: 13px;
    }
    
    .cgcg-template-actions {
        flex-direction: column;
    }
    
    .cgcg-template-actions .btn {
        width: 100%;
    }
}

