:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --bg: #F8FAFC;
    --surface: #FFFFFF;
    --border: #E2E8F0;
    --text: #0F172A;
    --text-muted: #64748B;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: #f4f7f6;
    background-image: 
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.1) 0, transparent 40%),
        radial-gradient(at 100% 100%, rgba(147, 51, 234, 0.1) 0, transparent 40%);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo i {
    font-size: 2rem;
    color: var(--primary);
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.5));
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo span {
    color: var(--primary);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--surface);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px border var(--border);
    font-size: 0.875rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
}

/* Cards */
.glass-card {
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* Tag Navigation */
.tag-navigation {
    margin-bottom: 2rem;
}

.tag-pills {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: thin;
}

.tag-pill {
    padding: 0.6rem 1.25rem;
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 50px;
    white-space: nowrap;
    font-size: 0.875rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.tag-pill:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text);
}

.tag-pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.search-section {
    margin-bottom: 2rem;
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

/* Workflow Styling */
.workflow-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.step-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-card.locked {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(1);
}

.step-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.step-number {
    background: var(--primary);
    color: white;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.875rem;
}

.step-desc {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.input-action-group {
    display: flex;
    gap: 1rem;
}

.preview-box {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #334155;
    animation: fadeIn 0.4s ease-out;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.preview-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.preview-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.preview-value {
    color: var(--text);
}

.recreation-box {
    text-align: center;
    padding: 2rem;
    background: #ffffff;
    border-radius: var(--radius);
    border: 1px dashed var(--primary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-top: 1rem;
    animation: slideUp 0.5s ease-out;
}

.btn-large-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    padding: 1rem 3rem;
    font-size: 1.125rem;
    border-radius: 50px;
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-large-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
}

.warning-box {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.warning-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.btn-small-warning {
    background: var(--warning);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    border-radius: 6px;
}

.btn-small-warning:hover:not(:disabled) {
    background: #d97706;
    transform: translateY(-1px);
}

.btn-small-warning:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-card h2 {
    margin-bottom: 0.5rem;
}

.search-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.search-box {
    display: flex;
    gap: 1rem;
}

input, select, textarea {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #1e293b;
    font-family: inherit;
    font-size: 1rem;
    width: 100%;
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
    background: #ffffff;
}

button {
    cursor: pointer;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(79, 70, 229, 0.3);
}

#searchBtn {
    padding: 0 2rem;
    background-color: var(--primary);
    color: white;
}

/* Table */
.table-card {
    padding: 0;
    overflow: hidden;
}

.card-header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.badge {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    padding: 1rem 2rem;
    background: rgba(15, 23, 42, 0.4);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

td {
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.btn-action {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.btn-action:hover {
    background: var(--primary);
    color: white;
}

.btn-action:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border-color: var(--border);
    cursor: not-allowed;
    transform: none !important;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease-out;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.close-btn {
    background: transparent;
    font-size: 1.5rem;
    color: var(--text-muted);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.full-width {
    grid-column: span 2;
}

label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.form-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.btn-secondary {
    background: #ffffff;
    color: #475569;
    padding: 0.75rem 1.5rem;
    border: 1px solid #cbd5e1;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: var(--surface);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: toastIn 0.3s ease-out forwards;
}

@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.success i { color: var(--success); }
.toast.error i { color: var(--error); }

/* Responsive */
@media (max-width: 768px) {
    .form-grid { grid-template-columns: 1fr; }
    .full-width { grid-column: span 1; }
    .search-box { flex-direction: column; }
    header { flex-direction: column; gap: 1rem; align-items: flex-start; }
}
/* Success Modal Specifics */
.success-theme {
    border-top: 4px solid var(--success) !important;
}

.text-center { text-align: center; }

.success-icon {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 1.5rem;
    animation: scaleCheck 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleCheck {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.ticket-id-display {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.ticket-id-display .label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.copy-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.copy-box code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 700;
}

.btn-icon {
    background: var(--surface);
    color: var(--text);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}

.btn-icon:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.form-actions.center {
    justify-content: center;
}

/* Confirm Modal Specifics */
.confirm-theme {
    border-top: 4px solid var(--warning) !important;
}

.action-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.action-icon.warning {
    color: var(--warning);
}

.modal-body p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Sign-In Gate */
.signin-gate {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
}

.signin-card {
    text-align: center;
    max-width: 420px;
    width: 100%;
    padding: 3rem;
}

.signin-icon {
    font-size: 3rem;
    color: var(--primary);
    filter: drop-shadow(0 0 12px rgba(99,102,241,0.5));
    margin-bottom: 1.5rem;
}

.signin-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.signin-card p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.signin-card .g_id_signin {
    display: flex;
    justify-content: center;
}

/* Sign-Out Button */
.btn-signout {
    background: transparent;
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.btn-signout:hover {
    background: rgba(239,68,68,0.1);
    color: var(--error);
    border-color: var(--error);
}

/* Already Recreated Warning */
.already-recreated-warning {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-left: 4px solid var(--warning);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    color: #92400e;
}

.already-recreated-warning i {
    font-size: 1.5rem;
    color: var(--warning);
}

.already-recreated-warning strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.already-recreated-warning p {
    font-size: 0.875rem;
    margin: 0;
    color: #92400e;
}

.already-recreated-warning code {
    background: rgba(255, 255, 255, 0.5);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
}
