* { box-sizing: border-box; }
html, body, #app { height: 100%; }
body {
    margin: 0;
    font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Inter,system-ui,sans-serif;
    background: linear-gradient(135deg, rgba(241, 245, 249, 0.9) 0%, rgba(226, 232, 240, 0.7) 100%);
    color: #4b5563;
    backdrop-filter: blur(20px);
}
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* Header */
.header-card{ 
    background:rgba(255,255,255,0.75); 
    border-radius:16px; 
    padding:24px; 
    margin-bottom:20px; 
    box-shadow:0 4px 20px rgba(0,0,0,0.08); 
    display:flex; 
    justify-content:space-between; 
    align-items:center; 
    backdrop-filter:blur(20px); 
    border:1px solid rgba(255,255,255,0.3); 
}
.header-title{ 
    font-size:24px; 
    font-weight:600; 
    color:#374151; 
    display:flex; 
    align-items:center; 
    gap:8px; 
}
.header-logo{
    width:40px;
    height:40px;
    object-fit:contain;
    margin-top: -10px;
}
.header-icon{ 
    width:24px; 
    height:24px; 
    color:#2563eb; 
}
.header-actions {
    display: flex;
    gap: 12px;
}

/* Buttons */
.btn{ 
    padding:10px 20px; 
    border-radius:10px; 
    border:none; 
    font-weight:500; 
    cursor:pointer; 
    display:inline-flex; 
    align-items:center; 
    gap:8px; 
    transition:all .2s; 
    position: relative;
    overflow: hidden;
}

.btn:active {
    animation: buttonPress 0.1s ease;
}

@keyframes buttonPress {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}
.btn-primary{ 
    background:linear-gradient(135deg,rgba(59,130,246,0.85) 0%,rgba(37,99,235,0.95) 100%); 
    color:#fff; 
    backdrop-filter:blur(10px); 
    border:1px solid rgba(59,130,246,0.2); 
}
.btn-primary:hover{ 
    transform:translateY(-1px); 
    box-shadow:0 4px 12px rgba(59,130,246,0.3); 
}
.btn-secondary{ 
    background:rgba(255,255,255,0.7); 
    color:#6b7280; 
    border:1px solid rgba(148,163,184,0.4); 
    backdrop-filter:blur(10px); 
}
.btn-secondary:hover{ 
    background:rgba(255,255,255,0.9); 
}

/* Main Card */
.main-card{ 
    background:rgba(255,255,255,0.65); 
    border-radius:16px; 
    padding:24px; 
    box-shadow:0 4px 20px rgba(0,0,0,0.06); 
    backdrop-filter:blur(20px); 
    border:1px solid rgba(255,255,255,0.3); 
    animation: cardSlideIn 0.5s ease;
}

@keyframes cardSlideIn {
    0% { 
        transform: translateY(20px); 
        opacity: 0; 
    }
    100% { 
        transform: translateY(0); 
        opacity: 1; 
    }
}
.card-header{ 
    display:flex; 
    justify-content:space-between; 
    align-items:center; 
    margin-bottom:24px; 
}
.card-title{ 
    font-size:20px; 
    font-weight:600; 
    color:#374151; 
}

/* Search */
.search-container{ 
    position:relative; 
    width:300px; 
}
.search-input{ 
    width:100%; 
    padding:10px 16px 10px 40px; 
    border:1px solid rgba(148,163,184,0.3); 
    border-radius:10px; 
    font-size:14px; 
    background:rgba(248,250,252,0.6); 
    backdrop-filter:blur(10px); 
}
.search-input:focus{ 
    outline:none; 
    border-color:rgba(59,130,246,0.5); 
    background:rgba(255,255,255,0.8); 
    animation: searchFocus 0.2s ease;
}

@keyframes searchFocus {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}
.search-icon{ 
    position:absolute; 
    left:12px; 
    top:50%; 
    transform:translateY(-50%); 
    color:#9ca3af; 
}

/* API Keys Section */
.api-keys-section {
    background: rgba(248, 250, 252, 0.8);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.5);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.api-keys-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
    flex-wrap: wrap;
    min-height: 48px;
    transition: all 0.6s ease;
}
.api-key-item {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    height: 48px;
    min-height: 48px;
    transform: scale(1);
    opacity: 1;
}

.api-key-item.adding {
    transform: scale(0.5);
    opacity: 0;
    animation: addKey 0.4s ease forwards;
}

@keyframes addKey {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.api-key-item.removing {
  transform: scale(0.8);
  opacity: 0;
  height: 0;
  padding: 0;
  margin: 0;
  border: none;
  overflow: hidden;
}

.employee-row.row-adding {
  transform: scale(0.5);
  opacity: 0;
  animation: addRow 0.4s ease forwards;
}

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

.employee-row.row-removing {
  transform: scale(0.8);
  opacity: 0;
  height: 0;
  padding: 0;
  margin: 0;
  border: none;
  overflow: hidden;
  transition: all 0.2s ease;
}
.api-key-item {
    cursor: pointer;
}
.api-key-item:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}
.api-key-item.selected {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}
.api-key-item.selected .api-key-name {
    color: #2563eb;
    font-weight: 600;
}

.api-key-item.api-key-skeleton {
    cursor: default;
    pointer-events: none;
}

.api-key-item.api-key-skeleton:hover {
    border-color: rgba(148, 163, 184, 0.3);
    box-shadow: none;
}

.skeleton-line {
    background: linear-gradient(
        90deg,
        rgba(226, 232, 240, 0.5) 0%,
        rgba(241, 245, 249, 0.8) 50%,
        rgba(226, 232, 240, 0.5) 100%
    );
    background-size: 200% 100%;
    border-radius: 4px;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-name {
    height: 14px;
    width: 80px;
}

.skeleton-value {
    height: 11px;
    width: 120px;
    margin-top: 4px;
}

.skeleton-button {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: linear-gradient(
        90deg,
        rgba(226, 232, 240, 0.5) 0%,
        rgba(241, 245, 249, 0.8) 50%,
        rgba(226, 232, 240, 0.5) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

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

.api-key-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.api-key-name {
    font-weight: 500;
    color: #374151;
    font-size: 13px;
}
.api-key-value {
    font-family: monospace;
    color: #6b7280;
    font-size: 11px;
    background: rgba(243, 244, 246, 0.6);
    padding: 2px 6px;
    border-radius: 4px;
}
.api-key-remove {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 9px;
}
.api-key-remove:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    transform: scale(1.1);
}
.api-key-add {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px dashed rgba(59, 130, 246, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    flex-shrink: 0;
    align-self: stretch;
}
.api-key-add:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    transform: scale(1.05);
}

/* Table */
.table-container {
    width: 100%;
}
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}
.table th {
    background: rgba(248, 250, 252, 0.8);
    padding: 16px 8px;
    text-align: left;
    font-weight: 600;
    color: #4b5563;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    font-size: 14px;
}
.table th:nth-child(1) { width: 8%; }
.table th:nth-child(2) { width: 30%; }
.table th:nth-child(3) { width: 20%; }
.table th:nth-child(4) { width: 20%; }
.table th:nth-child(5) { width: 22%; text-align: right; }
.table td {
    padding: 16px 8px;
    border-bottom: 1px solid rgba(243, 244, 246, 0.6);
    vertical-align: middle;
    border-right: 1px solid rgba(243, 244, 246, 0.2);
}
.table td:first-child {
    text-align: center;
}
.table td:last-child {
    border-right: none;
    text-align: right;
}
.table tr:hover {
    background: rgba(248, 250, 252, 0.6);
}
.table tr:last-child td {
    border-bottom: none;
}

/* Status Indicator */
.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(203, 213, 225, 0.8);
    border: 2px solid rgba(203, 213, 225, 0.6);
    transition: all 0.2s ease;
    display: block;
    margin: 0 auto;
}

.status-indicator.active {
    background: rgba(34, 197, 94, 0.9);
    border-color: rgba(34, 197, 94, 0.7);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Dropdown */
.dropdown {
    padding: 8px 12px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 120px;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}
.dropdown:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(248, 250, 252, 0.8);
}
.dropdown span {
    flex: 1;
    font-size: 14px;
}
.dropdown i {
    font-size: 12px;
    color: #9ca3af;
}

/* Employee Info */
.employee-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(226, 232, 240, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 14px;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
}
.employee-name {
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

/* Action Buttons */
.btn-action {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

.btn-action:active {
    animation: buttonPress 0.1s ease;
}

.btn-invite {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.btn-invite:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.btn-exclude {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-exclude:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.btn-action i {
    font-size: 12px;
}

/* Loading State */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.5);
    margin: 20px 0;
}

.loading-spinner {
    position: relative;
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top: 3px solid #6366f1;
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

.spinner-ring:nth-child(2) {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border-top-color: #8b5cf6;
    animation-delay: -0.4s;
}

.spinner-ring:nth-child(3) {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    border-top-color: #06b6d4;
    animation-delay: -0.8s;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 16px;
    font-weight: 500;
    color: #6b7280;
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.5);
    margin: 20px 0;
}
.empty-icon {
    font-size: 32px;
    color: rgba(203, 213, 225, 0.6);
    margin-bottom: 12px;
}
.empty-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #6b7280;
    line-height: 1.4;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}
.empty-description {
    font-size: 14px;
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}
.modal-overlay.success-anim {
    backdrop-filter: blur(24px);
    background: rgba(0, 0, 0, 0.45);
}
.modal {
    background: rgba(255, 255, 255, 0.90);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
    contain: paint;
    transition:
        transform 1.2s cubic-bezier(.25,.46,.45,.94),
        opacity 1.2s cubic-bezier(.25,.46,.45,.94),
        background-color 1.2s cubic-bezier(.25,.46,.45,.94),
        border-color 1.2s cubic-bezier(.25,.46,.45,.94);
}
.modal.success-anim {
    position: relative;
    overflow: visible;
    transform-origin: center center;
    border-radius: 9999px; /* set instantly to avoid interpolating border radius */
    transform: scale(0.24);
    opacity: 0;
    background-color: rgba(255,255,255,0);
    border-color: rgba(255,255,255,0);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    background: rgba(248, 250, 252, 0.5);
    border-radius: 16px 16px 0 0;
}
.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 12px;
}
.modal-header h3::before {
    content: "\f007";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 20px;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 5px;
    width: 24px;
    height: 24px;
}
.close-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    font-size: 16px;
    cursor: pointer;
    color: #ef4444;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    transform: scale(1.05);
}
.modal-body {
    padding: 28px;
}
.form-group {
    margin-bottom: 24px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 10px;
    font-size: 14px;
    background: rgba(248, 250, 252, 0.6);
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    color: #374151;
}
.form-input:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    animation: inputFocus 0.2s ease;
}
.form-input::placeholder {
    color: #9ca3af;
}
@keyframes inputFocus {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 24px 28px;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    background: rgba(248, 250, 252, 0.3);
    border-radius: 0 0 16px 16px;
}

.modal.shake {
    animation: shake .22s ease-out both;
}

@keyframes shake {
    0% { transform: translateX(0); }
    20% { transform: translateX(-3px); }
    40% { transform: translateX(3px); }
    60% { transform: translateX(-2px); }
    80% { transform: translateX(2px); }
    100% { transform: translateX(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        transform: scale(0.9) translateY(-20px); 
        opacity: 0; 
    }
    to { 
        transform: scale(1) translateY(0); 
        opacity: 1; 
    }
}

/* keyframes removed; smooth transition-based fade+scale used instead */
.modal.success-anim .modal-header,
.modal.success-anim .modal-body,
.modal.success-anim .modal-footer {
    opacity: 0;
    transition: opacity .18s ease;
}

.modal-overlay.success-anim {
    backdrop-filter: blur(24px);
    background: rgba(0, 0, 0, 0.45);
    transition: backdrop-filter .3s ease, background .3s ease;
}

/* Invite Modal Styles */
.invite-modal {
    max-width: 700px;
}

.invite-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    min-height: 300px;
}

.invite-step {
    position: relative;
    min-height: 400px;
    padding-bottom: 60px;
}

.step-title {
    font-size: 20px;
    font-weight: 600;
    color: #374151;
    margin-top: -8px;
    margin-bottom: 24px;
    text-align: center;
}

.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.selection-card {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(148, 163, 184, 0.3);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    backdrop-filter: blur(10px);
}

.selection-card:hover {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.selection-card.selected {
    border-color: rgba(59, 130, 246, 0.8);
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25);
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 24px;
    transition: all 0.2s ease;
}

.role-card .card-icon {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.contract-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(37, 99, 235, 0.12) 100%);
    border-color: rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
    min-height: 180px;
    justify-content: center;
}

.contract-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.contract-card .card-main-icon {
    font-size: 80px;
    color: rgba(59, 130, 246, 0.7);
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(59, 130, 246, 0.2));
}

.contract-card.selected {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.2) 100%);
    border-color: rgba(59, 130, 246, 0.8);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.contract-card.selected .card-main-icon {
    color: rgba(59, 130, 246, 1);
    transform: scale(1.1);
}

.card-card {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(22, 163, 74, 0.12) 100%);
    border-color: rgba(34, 197, 94, 0.3);
    position: relative;
    overflow: hidden;
    min-height: 180px;
    justify-content: center;
}

.card-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.card-card .card-main-icon {
    font-size: 80px;
    color: rgba(34, 197, 94, 0.7);
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(34, 197, 94, 0.2));
}

.card-card.selected {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.2) 100%);
    border-color: rgba(34, 197, 94, 0.8);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
}

.card-card.selected .card-main-icon {
    color: rgba(34, 197, 94, 1);
    transform: scale(1.1);
}

.card-content {
    width: 100%;
    position: relative;
    z-index: 1;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.contract-card .card-title,
.card-card .card-title {
    color: #1e293b;
    font-weight: 700;
}

.card-subtitle {
    font-size: 13px;
    color: #6b7280;
    font-family: monospace;
    background: rgba(255, 255, 255, 0.6);
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 4px;
}

.contract-card .card-subtitle,
.card-card .card-subtitle {
    color: #475569;
    background: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.btn-continue {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.85) 0%, rgba(37, 99, 235, 0.95) 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-continue:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.btn-continue:active {
    transform: translateY(0);
}

.btn-back {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.8);
    color: #6b7280;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 10px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-back:hover {
    background: rgba(248, 250, 252, 0.9);
    border-color: rgba(148, 163, 184, 0.5);
    color: #374151;
}

.btn-send {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.85) 0%, rgba(22, 163, 74, 0.95) 100%);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-send:hover {
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
}

/* Success check animation */
.success-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none;
    z-index: 1100;
    backdrop-filter: blur(26px);
    background: rgba(0, 0, 0, 0.45);
    transition: opacity .5s ease;
    opacity: 0;
    animation: overlayIn .35s ease-out forwards;
}

@keyframes overlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.success-check {
    width: 120px; height: 120px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 9999px;
    background: radial-gradient(120% 120% at 30% 20%, #34d399 0%, #22c55e 60%, #16a34a 100%);
    box-shadow: 0 14px 36px rgba(34,197,94,0.35);
    transform: scale(0.85);
    opacity: 0;
    animation: checkPop .7s cubic-bezier(.22,.61,.36,1) forwards;
}
.success-check svg {
    width: 58px; height: 58px;
}
.success-check path {
    stroke: #fff;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    stroke-dasharray: 120;
    stroke-dashoffset: 120;
    animation: drawCheck 1.3s ease-out .3s forwards;
}

@keyframes checkPop {
    0% { transform: scale(0.85); opacity: 0; }
    58% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes drawCheck {
    to { stroke-dashoffset: 0; }
}

/* gentle fade-out for success overlay (optional when hiding) */
.success-overlay.fade-out { animation: successOut .35s ease forwards; }
@keyframes successOut {
    to { opacity: 0; transform: scale(.98); }
}

.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1100;
}
.toast {
    min-width: 300px;
    max-width: 420px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.60), rgba(255,255,255,0.45))
        ,rgba(255,255,255,0.50);
    border: 1px solid rgba(226,232,240,0.50);
    border-left: none;
    border-radius: 14px;
    box-shadow:
        0 12px 30px rgba(15, 23, 42, 0.12),
        inset 0 1px 0 rgba(255,255,255,0.35);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    padding-left: 18px; /* compensate for left stripe width */
    animation: toastSlideIn 0.25s ease;
    transition: transform .18s ease, box-shadow .18s ease;
    position: relative;
}
.toast:hover {
    transform: translateY(-2px);
    box-shadow:
        0 16px 36px rgba(15,23,42,0.16),
        inset 0 1px 0 rgba(255,255,255,0.4);
}
.toast::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
      width: 5px;
      border-top-left-radius: 14px;
      border-bottom-left-radius: 14px;
      /* soften edges and blend with card */
      box-shadow:
        inset 1px 0 0 rgba(255,255,255,0.35),
        2px 0 6px rgba(15,23,42,0.10);
}
.toast.success::before {
      background: linear-gradient(180deg, rgba(52,211,153,0.95) 0%, rgba(34,197,94,0.92) 55%, rgba(22,163,74,0.90) 100%);
}
.toast.error::before {
      background: linear-gradient(180deg, rgba(248,113,113,0.95) 0%, rgba(239,68,68,0.92) 55%, rgba(220,38,38,0.90) 100%);
}
.toast .icon {
    flex: 0 0 28px;
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    color: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}
.toast.success .icon {
    background: radial-gradient(120% 120% at 30% 20%, #34d399 0%, #22c55e 60%, #16a34a 100%);
}
.toast.error .icon {
    background: radial-gradient(120% 120% at 30% 20%, #f87171 0%, #ef4444 60%, #dc2626 100%);
}
.toast .content { flex: 1; }
.toast .content { display: flex; flex-direction: column; justify-content: center; }
.toast .title { font-weight: 600; font-size: 14px; color: #0f172a; margin-bottom: 2px; letter-spacing: .1px; line-height: 1.25; }
.toast .message { font-size: 13px; color: #475569; line-height: 1.35; }
.toast .close {
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    width: 28px; height: 28px;
    border-radius: 6px;
}
.toast .close:hover { background: #f1f5f9; color: #6b7280; }

@keyframes toastSlideIn {
    from { transform: translateY(-8px) translateX(8px); opacity: 0; }
    to { transform: translateY(0) translateX(0); opacity: 1; }
}

@keyframes toastFadeOut {
    from { opacity: 1; }
    to { opacity: 0; transform: translateY(-6px); }
}

/* Optional: subtle closing state */
.toast.closing { animation: toastFadeOut .18s ease forwards; }

/* Button spinner */
.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-right-color: rgba(255,255,255,0.6);
    border-radius: 50%;
    animation: spin .8s linear infinite;
    display: inline-block;
}
