@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --navy: #0E1545;
    --purple: #3D308D;
    --bg: #f6f6fb;
}

* {
    box-sizing: border-box;
}

/* .loading-state and a few other elements set their own `display`, which
   otherwise wins over the browser's default `[hidden] { display: none }`
   rule (author CSS beats the UA stylesheet even at equal specificity). */
[hidden] {
    display: none !important;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--navy);
}

.page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 48px 24px 32px;
}

.page-header h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
}

.subtitle {
    margin: 0 0 32px;
    color: #4b4f75;
    font-size: 15px;
}

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(14, 21, 69, 0.08);
    padding: 24px;
    margin-bottom: 20px;
}

.connect-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eceefa;
}

.connect-row:last-of-type {
    border-bottom: none;
}

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

.connect-row-title {
    font-weight: 600;
}

.connect-row-status {
    font-size: 13px;
    color: #7a7ea3;
}

.connect-row-status.connected {
    color: #1e8e5a;
    font-weight: 600;
}

.connect-row-error {
    color: #c23b3b;
    font-size: 13px;
    margin: 4px 0 12px;
}

.btn {
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    padding: 10px 18px;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

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

.btn-primary {
    background: var(--purple);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    opacity: 0.9;
}

.btn-secondary {
    background: #eceefa;
    color: var(--navy);
}

.btn-secondary:hover:not(:disabled) {
    opacity: 0.85;
}

.loading-state {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    color: #4b4f75;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 3px solid #ddd;
    border-top-color: var(--purple);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.results-summary {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px;
}

.empty-state {
    font-size: 16px;
    font-weight: 600;
    color: #1e8e5a;
}

.results-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.results-table-scroll {
    max-height: 520px;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid #eceefa;
    border-radius: 8px;
}

.results-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 14px;
    font-size: 14px;
    color: #4b4f75;
}

table#results-table {
    width: 100%;
    min-width: 820px;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 14px;
}

table#results-table thead th {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

table#results-table col.col-name { width: 24%; }
table#results-table col.col-type { width: 12%; }
table#results-table col.col-location { width: 16%; }
table#results-table col.col-size { width: 9%; }
table#results-table col.col-modified { width: 15%; }
table#results-table col.col-link { width: 12%; }
table#results-table col.col-status { width: 12%; }

table#results-table tbody tr.moved {
    color: #1e8e5a;
}

table#results-table tbody tr.move-failed {
    color: #c23b3b;
}

table#results-table th {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 2px solid #eceefa;
    color: #4b4f75;
    font-weight: 600;
    overflow-wrap: break-word;
}

table#results-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #f1f2fa;
    overflow-wrap: break-word;
    vertical-align: top;
}

table#results-table tbody tr:hover {
    background: #fafaff;
}

table#results-table a {
    color: var(--purple);
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

table#results-table a:hover {
    text-decoration: underline;
}

.move-section {
    margin: 20px 0;
    padding: 16px;
    background: #f6f6fb;
    border-radius: 8px;
}

.move-section-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
}

.move-section-hint {
    margin: 0 0 14px;
    font-size: 13px;
    color: #4b4f75;
}

.move-section-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.text-input {
    flex: 1;
    min-width: 240px;
    font-family: inherit;
    font-size: 14px;
    padding: 10px 12px;
    border: 1px solid #d8daea;
    border-radius: 8px;
    color: var(--navy);
}

.text-input:focus {
    outline: none;
    border-color: var(--purple);
}

.move-section-error {
    color: #c23b3b;
    font-size: 13px;
    margin: 10px 0 0;
}

.move-confirm {
    margin-top: 14px;
    padding: 14px;
    background: #fff7e6;
    border: 1px solid #f2dfa8;
    border-radius: 8px;
}

.move-confirm p {
    margin: 0 0 10px;
    font-size: 14px;
}

.move-summary {
    margin: 14px 0 0;
    font-size: 14px;
    font-weight: 600;
}

#download-errors-btn {
    margin-top: 10px;
}

.page-footer {
    text-align: center;
    color: #8a8db0;
    font-size: 13px;
    margin-top: 24px;
}
