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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

h1 {
    font-size: 28px;
    font-weight: 600;
}

.auth-status {
    display: flex;
    align-items: center;
    gap: 15px;
}

.auth-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#auth-text {
    font-size: 14px;
    opacity: 0.9;
}

.user-info {
    font-size: 12px;
    opacity: 0.8;
    font-weight: 500;
}

main {
    padding: 40px 30px;
}

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

.api-menu h2 {
    margin-bottom: 30px;
}

.api-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.api-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s;
}

.api-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.api-card h3 {
    color: #667eea;
    font-size: 20px;
    margin-bottom: 12px;
}

.api-card p {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.api-card button {
    width: 100%;
}

.api-detail {
    display: none;
}

.btn-back {
    background: transparent;
    border: none;
    color: #667eea;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 12px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.btn-back:hover {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 6px;
}

.api-section {
    margin-bottom: 50px;
    padding-bottom: 50px;
    border-bottom: 2px solid #e2e8f0;
}

.api-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

h2 {
    font-size: 24px;
    color: #667eea;
    margin-bottom: 10px;
}

.description {
    color: #64748b;
    margin-bottom: 25px;
    font-size: 14px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #475569;
    font-size: 14px;
}

input, select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

input:focus, select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.field-help {
    font-size: 13px;
    color: #64748b;
    margin: 6px 0 10px 0;
    line-height: 1.4;
    font-weight: 400;
}

.url-preview {
    margin-top: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.url-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.url-display {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #667eea;
    font-weight: 600;
    word-break: break-all;
}

.subdomain-placeholder {
    color: #94a3b8;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: white;
    color: #667eea;
    border: 2px solid white;
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.btn-secondary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

.response-container {
    margin-top: 30px;
}

h3 {
    font-size: 16px;
    color: #475569;
    margin-bottom: 12px;
}

.response-box {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    min-height: 100px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    white-space: pre-wrap;
    word-break: break-word;
    color: #1e293b;
    max-height: 400px;
    overflow-y: auto;
}

.response-box:empty::before {
    content: 'Response will appear here...';
    color: #94a3b8;
    font-style: italic;
}

.response-box.error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.response-box.success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.gst-entry {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.gst-entry h4 {
    font-size: 18px;
    color: #667eea;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #bbf7d0;
}

.gst-entry h5 {
    font-size: 14px;
    color: #166534;
    margin-bottom: 8px;
    margin-top: 12px;
}

.gst-field {
    padding: 8px 0;
    line-height: 1.6;
}

.gst-field strong {
    color: #0f766e;
    min-width: 120px;
    display: inline-block;
}

.gst-section {
    background: rgba(187, 247, 208, 0.3);
    padding: 12px;
    border-radius: 6px;
    margin: 12px 0;
}

.worksheet-table {
    margin-top: 12px;
    overflow-x: auto;
}

.worksheet-table-inner {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.worksheet-table-inner thead {
    background: rgba(102, 126, 234, 0.1);
}

.worksheet-table-inner th {
    padding: 10px;
    text-align: left;
    font-weight: 600;
    color: #667eea;
    border-bottom: 2px solid #bbf7d0;
}

.worksheet-table-inner td {
    padding: 8px 10px;
    border-bottom: 1px solid #e2e8f0;
}

.worksheet-table-inner tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.worksheet-table-inner tbody tr:last-child td {
    border-bottom: none;
}

footer {
    background: #f8fafc;
    padding: 20px 30px;
    border-top: 2px solid #e2e8f0;
    font-size: 13px;
    color: #64748b;
}

footer p {
    margin-bottom: 8px;
}

footer code {
    background: #e2e8f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 24px;
    }
}
