#tc-tariff-app {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
}

/* Container */
#tc-tariff-app.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* Card */
#tc-tariff-app .card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 40px;
}
#tc-tariff-app .card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 16px;
    margin-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 700;
    font-size: 16px;
}

/* Form */
#tc-tariff-app .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 640px) { #tc-tariff-app .form-grid { grid-template-columns: 1fr; } }

#tc-tariff-app .form-group { display: flex; flex-direction: column; gap: 6px; }
#tc-tariff-app .form-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}
#tc-tariff-app .form-input {
    height: 48px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 16px;
    background: #ffffff;
    color: #111827;
    outline: none;
    transition: border-color 0.2s;
}
#tc-tariff-app .form-input:focus { border-color: #111827; }
#tc-tariff-app .form-hint { font-size: 12px; color: #6b7280; }

/* Dropdown */
#tc-tariff-app .dropdown-wrapper { position: relative; }
#tc-tariff-app .dropdown {
    position: absolute;
    z-index: 50;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    max-height: 240px;
    overflow-y: auto;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    display: none;
}
#tc-tariff-app .dropdown.open { display: block; }
#tc-tariff-app .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    color: #111827;
    transition: background 0.15s;
}
#tc-tariff-app .dropdown-item:hover { background: #f3f4f6; }
#tc-tariff-app .dropdown-item .rate { margin-left: auto; font-size: 12px; color: #6b7280; }

/* Button */
#tc-tariff-app .btn-submit {
    margin-top: 24px;
    width: 100%;
    height: 48px;
    background: #111827;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s;
}
#tc-tariff-app .btn-submit:hover { opacity: 0.9; }
#tc-tariff-app .btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* Error */
#tc-tariff-app .error-box {
    margin-top: 16px;
    padding: 12px 16px;
    border: 2px solid rgba(220,38,38,0.3);
    background: rgba(220,38,38,0.05);
    border-radius: 8px;
    color: #dc2626;
    font-size: 14px;
    display: none;
}

/* Results */
#tc-tariff-app .results {
    display: none;
    margin-top: 32px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    padding: 24px;
}
#tc-tariff-app .results-header { margin-bottom: 16px; }
#tc-tariff-app .results-header h3 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
#tc-tariff-app .results-header p { font-size: 14px; color: #6b7280; }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
#tc-tariff-app .badge-active { background: #f3f4f6; color: #111827; }
#tc-tariff-app .badge-lowered { background: #d1fae5; color: #065f46; }
#tc-tariff-app .badge-paused { background: #fef3c7; color: #92400e; }
#tc-tariff-app .badge-negotiating { background: #dbeafe; color: #1e40af; }

#tc-tariff-app .rate-display {
    text-align: center;
    padding: 32px 24px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #f8f9fa;
    margin-bottom: 24px;
}
#tc-tariff-app .rate-display .label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 8px;
}
#tc-tariff-app .rate-display .value { font-size: 64px; font-weight: 700; letter-spacing: -0.03em; }
#tc-tariff-app .rate-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 500;
}
#tc-tariff-app .rate-high { color: #d97706; }
#tc-tariff-app .rate-standard { color: #059669; }

#tc-tariff-app .breakdown { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
@media (max-width: 640px) { #tc-tariff-app .breakdown { grid-template-columns: 1fr; } }
#tc-tariff-app .breakdown-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    background: #f8f9fa;
}
#tc-tariff-app .breakdown-item .label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 4px;
}
#tc-tariff-app .breakdown-item .value { font-size: 18px; font-weight: 700; }
#tc-tariff-app .breakdown-item .desc { font-size: 12px; color: #6b7280; margin-top: 2px; }

#tc-tariff-app .notes-box {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f3f4f6;
    padding: 16px;
    margin-bottom: 16px;
}
#tc-tariff-app .notes-box h4 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
#tc-tariff-app .notes-box ul { list-style: none; padding: 0; }
#tc-tariff-app .notes-box li {
    font-size: 14px;
    color: #6b7280;
    padding: 2px 0 2px 14px;
    position: relative;
}
#tc-tariff-app .notes-box li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 4px;
    height: 4px;
    background: #6b7280;
    border-radius: 50%;
}

#tc-tariff-app .disclaimer { font-size: 12px; color: #6b7280; opacity: 0.7; }

/* Info Cards */
#tc-tariff-app .info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 40px; }
@media (max-width: 640px) { #tc-tariff-app .info-grid { grid-template-columns: 1fr; } }
#tc-tariff-app .info-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
}
#tc-tariff-app .info-card h4 { font-weight: 600; margin: 12px 0 4px; }
#tc-tariff-app .info-card p { font-size: 14px; color: #6b7280; line-height: 1.5; }
#tc-tariff-app .info-icon {
    width: 36px; height: 36px;
    background: #f3f4f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* Table */
#tc-tariff-app .table-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 40px;
}
#tc-tariff-app .table-header {
    padding: 16px 24px;
    border-bottom: 2px solid #e5e7eb;
}
#tc-tariff-app .table-header h3 { font-size: 18px; font-weight: 700; }
#tc-tariff-app .table-header p { font-size: 14px; color: #6b7280; }
#tc-tariff-app .table-wrap { overflow-x: auto; }
#tc-tariff-app table { width: 100%; border-collapse: collapse; font-size: 14px; }
#tc-tariff-app thead tr { background: #f3f4f6; border-bottom: 1px solid #e5e7eb; }
#tc-tariff-app th {
    padding: 12px 24px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    cursor: pointer;
    user-select: none;
}
#tc-tariff-app th:hover { color: #111827; }
#tc-tariff-app td { padding: 10px 24px; border-bottom: 1px solid rgba(0,0,0,0.03); }
#tc-tariff-app tr:hover td { background: rgba(0,0,0,0.015); }
#tc-tariff-app .country-cell { display: flex; align-items: center; gap: 8px; font-weight: 500; }
#tc-tariff-app .fw-semibold { font-weight: 600; }

/* Footer */
#tc-tariff-app .footer {
    border-top: 1px solid #e5e7eb;
    padding: 24px 0;
    text-align: center;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.6;
}

/* Spinner */
#tc-tariff-app .spinner {
    display: inline-block;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }