.sdf-container {
    max-width: 700px;
    margin: 0 auto;
    font-family: inherit;
}

.sdf-search-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.sdf-search-row input[type="text"] {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.sdf-search-row button {
    padding: 8px 16px;
    border: none;
    background: #2271b1;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
}

.sdf-breadcrumb {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.sdf-breadcrumb .sdf-crumb {
    color: #2271b1;
    text-decoration: none;
}

.sdf-breadcrumb .sdf-crumb:hover {
    text-decoration: underline;
}

.sdf-icon {
    margin-right: 6px;
}

.sdf-folder-link {
    font-weight: 500;
}

.sdf-results {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sdf-file-link {
    text-decoration: none;
    color: #2271b1;
    cursor: pointer;
}

.sdf-file-link:hover {
    text-decoration: underline;
}

.sdf-viewer-panel {
    margin-top: 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.sdf-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f5f5f5;
    padding: 8px 12px;
    font-weight: 600;
}

.sdf-viewer-header button {
    border: none;
    background: #ddd;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.sdf-viewer-body {
    padding: 10px;
}

.sdf-message {
    color: #a00;
    font-size: 0.9em;
}

.sdf-login-required {
    text-align: center;
    color: #555;
}

.sdf-auth-box {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 340px !important;
    margin: 24px auto !important;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 26px 24px 22px;
    border-top: 3px solid #B3222A;
}

.sdf-auth-box * {
    box-sizing: border-box !important;
}

.sdf-auth-box h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 16px;
    text-align: center;
    color: #22242A;
    letter-spacing: .2px;
}

.sdf-auth-box form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 4px;
    width: 100% !important;
}

.sdf-auth-box input {
    width: 100% !important;
    max-width: 100% !important;
    padding: 9px 11px !important;
    border: 1px solid #DADCE0;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
    transition: border-color .15s;
    height: auto !important;
}

.sdf-auth-box input:focus {
    outline: none;
    border-color: #B3222A;
}

.sdf-auth-box button {
    width: 100% !important;
    padding: 9px 12px !important;
    border: none;
    background: #B3222A;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .2px;
    margin-top: 2px;
    transition: background .15s;
}

.sdf-auth-box button:hover {
    background: #8f1b22;
}

.sdf-auth-divider {
    text-align: center;
    font-size: 11px;
    color: #8A8D93;
    margin: 14px 0 0;
    line-height: 1.5;
}

@media (max-width: 400px) {
    .sdf-auth-box {
        max-width: 100% !important;
        margin: 12px auto !important;
        padding: 20px 18px 18px;
        border-radius: 8px;
    }
}

.sdf-account-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.sdf-view-toggle {
    margin-right: 14px;
}

.sdf-view-btn {
    border: 1px solid #ddd;
    background: #fff;
    padding: 3px 8px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
}

.sdf-view-btn:first-child {
    border-radius: 4px 0 0 4px;
}

.sdf-view-btn:last-child {
    border-radius: 0 4px 4px 0;
    border-left: none;
}

.sdf-view-btn.active {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.sdf-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.sdf-folder-link {
    text-decoration: none;
    color: #22242A;
    font-weight: 500;
    display: flex;
    align-items: center;
    width: 100%;
}

.sdf-file-name {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.sdf-item-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sdf-file-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    margin-left: 10px;
}

.sdf-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    color: #555;
    background: #f2f2f2;
    cursor: pointer;
}

.sdf-action:hover {
    background: #e5e5e5;
}

/* Vista de íconos (grid) */
.sdf-results.sdf-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sdf-results.sdf-grid .sdf-result-item {
    flex-direction: column;
    width: 120px;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.sdf-results.sdf-grid .sdf-folder-link,
.sdf-results.sdf-grid .sdf-file-name {
    flex-direction: column;
    width: 100%;
}

.sdf-results.sdf-grid .sdf-icon {
    font-size: 32px;
    margin: 0 0 6px;
}

.sdf-results.sdf-grid .sdf-item-name {
    font-size: 12px;
    white-space: normal;
    word-break: break-word;
    max-width: 100%;
}

.sdf-results.sdf-grid .sdf-file-actions {
    margin: 8px 0 0;
    justify-content: center;
}

.sdf-message-error {
    color: #B3222A;
}
