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

:root {
    --background: #ffffff;
    --foreground: #1a1a1a;
    --card: #f5f9f5;
    --card-foreground: #1a1a1a;
    --primary: #22c55e;
    --primary-foreground: #ffffff;
    --secondary: #f0f7f0;
    --secondary-foreground: #1a1a1a;
    --muted: #f0f7f0;
    --muted-foreground: #666666;
    --accent: #4ade80;
    --accent-foreground: #1a1a1a;
    --destructive: #ef4444;
    --destructive-foreground: #ffffff;
    --border: #e5e5e5;
    --input: #ffffff;
    --ring: rgba(34, 197, 94, 0.5);
    --radius: 0.5rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    min-height: 100vh;
}

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

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

.header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--foreground);
}

.subtitle {
    color: var(--muted-foreground);
    font-size: 1.125rem;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-description {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.card-content {
    /* Content styles */
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--foreground);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    background: var(--input);
    color: var(--foreground);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--ring);
}

.form-textarea {
    resize: vertical;
    font-family: 'Courier New', monospace;
}

.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

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

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: calc(var(--radius) - 2px);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-foreground);
}

.btn-primary:hover:not(:disabled) {
    background: #16a34a;
}

.btn-outline {
    background: transparent;
    color: var(--foreground);
    border: 1px solid var(--border);
}

.btn-outline:hover:not(:disabled) {
    background: var(--secondary);
}

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

.btn-link {
    background: none;
    border: none;
    color: var(--muted-foreground);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn-link:hover {
    color: var(--foreground);
}

.tabs {
    margin-top: 1.5rem;
}

.tabs-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.5rem;
}

.tab-btn {
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: var(--muted-foreground);
    cursor: pointer;
    border-radius: calc(var(--radius) - 2px);
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 500;
}

.tab-btn:hover {
    background: var(--secondary);
    color: var(--foreground);
}

.tab-btn.active {
    background: var(--primary);
    color: var(--primary-foreground);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tabs-inner {
    margin-top: 1rem;
}

.tabs-list-inner {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.tab-btn-inner {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--muted-foreground);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-btn-inner:hover {
    color: var(--foreground);
}

.tab-btn-inner.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content-inner {
    display: none;
}

.tab-content-inner.active {
    display: block;
}

.alert {
    padding: 1rem;
    border-radius: calc(var(--radius) - 2px);
    margin-bottom: 1rem;
}

.alert-info {
    background: #e0f2fe;
    border: 1px solid #7dd3fc;
    color: #0c4a6e;
}

.alert-success {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}

.alert-error {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    border: 1px solid #fde047;
    color: #92400e;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-error {
    background: #fee2e2;
    color: #991b1b;
}

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

.progress-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.progress-bar {
    width: 100%;
    height: 0.75rem;
    background: var(--secondary);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s;
    width: 0%;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.ml-2 {
    margin-left: 0.5rem;
}

.results-list {
    margin-top: 1rem;
}

.result-item {
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--input);
}

.result-item.status-processing {
    border-left: 4px solid #eab308;
    background: #fefce8;
}

.result-item.status-success {
    border-left: 4px solid #22c55e;
    background: #f0fdf4;
}

.result-item.status-error {
    border-left: 4px solid #ef4444;
    background: #fef2f2;
}

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

.result-icon {
    font-size: 1.25rem;
}

.result-status {
    margin-left: auto;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-processing .result-status {
    background: #fef3c7;
    color: #92400e;
}

.status-success .result-status {
    background: #dcfce7;
    color: #166534;
}

.status-error .result-status {
    background: #fee2e2;
    color: #991b1b;
}

.result-message {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.result-redirect {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--secondary);
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    font-family: monospace;
}

.result-redirect span:first-child {
    color: var(--muted-foreground);
}

.result-redirect span:last-child {
    color: var(--primary);
    font-weight: 500;
}

.results-summary {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--secondary);
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid var(--border);
}

.results-summary h4 {
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
}

.results-summary p {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.result-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.result-item-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.result-item-message {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.certificate-section {
    background: #dcfce7;
    border: 1px solid #86efac;
    padding: 1rem;
    border-radius: calc(var(--radius) - 2px);
    margin-top: 1rem;
}

.certificate-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    background: #ffffff;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    resize: vertical;
    min-height: 150px;
}

.mt-4 {
    margin-top: 1rem;
}

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

.text-sm {
    font-size: 0.875rem;
}

.icon {
    width: 1rem;
    height: 1rem;
    display: inline-block;
}

.icon-success {
    color: #16a34a;
}

.icon-error {
    color: #ef4444;
}

.icon-pending {
    color: #eab308;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

table th,
table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

table th {
    font-weight: 600;
    background: var(--secondary);
}

table tr:hover {
    background: var(--secondary);
}

.loading {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none !important;
}


