/**
 * Seenalt - Admin Styles
 */

/* ==========================================================================
   Variables
   ========================================================================== */
:root {
    --seenalt-primary: #1f7ae0;
    --seenalt-primary-hover: #1663b7;
    --seenalt-success: #00a32a;
    --seenalt-warning: #dba617;
    --seenalt-error: #d63638;
    --seenalt-gray-100: #f6f7f7;
    --seenalt-gray-200: #f0f0f1;
    --seenalt-gray-300: #dcdcde;
    --seenalt-gray-500: #787c82;
    --seenalt-gray-700: #3c434a;
    --seenalt-border-radius: 14px;
    --seenalt-shadow: 0 8px 24px rgba(18, 34, 58, 0.08);
}

/* ==========================================================================
   Layout
   ========================================================================== */
.seenalt-wrap {
    max-width: 1240px;
    margin: 24px 20px 20px 0;
}

.seenalt-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.seenalt-page-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.seenalt-page-title .seenalt-page-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    font-size: 26px;
    line-height: 42px;
    color: #fff;
    background: linear-gradient(135deg, #2f8ef8, #1566cc);
    box-shadow: 0 8px 20px rgba(24, 103, 196, 0.35);
}

.seenalt-header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.seenalt-btn {
    border-radius: 10px !important;
    min-height: 40px !important;
    padding: 0 14px !important;
    font-weight: 600;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    line-height: 1;
}

.seenalt-btn-primary {
    background: linear-gradient(135deg, var(--seenalt-primary), #155ec9) !important;
    border-color: #155ec9 !important;
    box-shadow: 0 6px 16px rgba(31, 122, 224, 0.28);
}

.seenalt-btn-secondary {
    border-color: #c9d8ea !important;
    background: #f7fbff !important;
}

.seenalt-header-actions .button .dashicons {
    margin: 0;
    width: 18px;
    height: 18px;
    font-size: 18px;
    line-height: 18px;
}

/* ==========================================================================
   Cards Grid
   ========================================================================== */
.seenalt-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.seenalt-card {
    background: linear-gradient(180deg, #ffffff, #fcfdff);
    border: 1px solid #e6edf5;
    border-radius: var(--seenalt-border-radius);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--seenalt-shadow);
}

.seenalt-card-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.seenalt-card-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #fff;
}

.seenalt-icon-blue { background: linear-gradient(135deg, #2f8ef8, #1364cb); }
.seenalt-icon-green { background: linear-gradient(135deg, #15b955, #009941); }
.seenalt-icon-orange { background: linear-gradient(135deg, #f2b112, #d28f00); }
.seenalt-icon-purple { background: linear-gradient(135deg, #8b6cff, #6d43e6); }

.seenalt-card-value {
    font-size: 40px;
    font-weight: 700;
    color: #17212f;
    line-height: 1;
}

.seenalt-card-label {
    font-size: 13px;
    color: #5f6f84;
    margin-top: 6px;
    font-weight: 500;
}

/* ==========================================================================
   Progress Section
   ========================================================================== */
.seenalt-progress-section {
    background: #fff;
    border: 1px solid #e6edf5;
    border-radius: var(--seenalt-border-radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--seenalt-shadow);
}

.seenalt-progress-section h2 {
    margin-top: 0;
    margin-bottom: 15px;
}

.seenalt-progress-bar-container {
    background: #e8eff7;
    border-radius: 20px;
    height: 34px;
    overflow: hidden;
}

.seenalt-progress-bar {
    background: linear-gradient(90deg, var(--seenalt-success), #47c947);
    height: 100%;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    transition: width 0.5s ease;
}

.seenalt-progress-text {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.seenalt-progress-description {
    margin-top: 10px;
    color: var(--seenalt-gray-500);
}

/* ==========================================================================
   Usage Section
   ========================================================================== */
.seenalt-usage-section {
    background: #fff;
    border: 1px solid #e6edf5;
    border-radius: var(--seenalt-border-radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--seenalt-shadow);
}

.seenalt-usage-section h2 {
    margin-top: 0;
}

.seenalt-usage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.seenalt-usage-item {
    text-align: center;
    padding: 18px;
    background: #f8fbff;
    border: 1px solid #e5edf6;
    border-radius: 12px;
}

.seenalt-usage-label {
    font-size: 12px;
    color: #75859a;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.04em;
}

.seenalt-usage-value {
    font-size: 34px;
    font-weight: 700;
    color: #1a2432;
    line-height: 1;
}

.seenalt-plan-badge {
    background: linear-gradient(135deg, #2f8ef8, #1364cb);
    color: #fff;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 14px;
}

/* ==========================================================================
   Actions Section
   ========================================================================== */
.seenalt-actions-section {
    margin-bottom: 24px;
}

.seenalt-actions-section h2 {
    margin-bottom: 20px;
}

.seenalt-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.seenalt-action-card {
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    border: 1px solid #e6edf5;
    border-radius: var(--seenalt-border-radius);
    padding: 28px;
    text-align: center;
    box-shadow: var(--seenalt-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.seenalt-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(22, 44, 71, 0.12);
}

.seenalt-action-icon {
    width: 64px;
    height: 64px;
    background: #f1f6fc;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}

.seenalt-action-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: var(--seenalt-primary);
}

.seenalt-action-card h3 {
    margin: 0 0 10px;
}

.seenalt-action-card p {
    color: #64758a;
    margin-bottom: 18px;
}

.seenalt-actions-grid .button {
    min-height: 40px;
    border-radius: 10px;
    padding-inline: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1;
}

.seenalt-actions-grid .button .dashicons {
    margin: 0;
    width: 18px;
    height: 18px;
    font-size: 18px;
    line-height: 18px;
}

@media (max-width: 900px) {
    .seenalt-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .seenalt-header-actions {
        width: 100%;
    }
}

/* ==========================================================================
   Images Table
   ========================================================================== */
.seenalt-images-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.seenalt-images-count {
    font-size: 16px;
    color: #5f6f84;
    background: #f7fbff;
    border: 1px solid #dfe9f5;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
}

.seenalt-bulk-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.seenalt-bulk-actions .button .dashicons,
.seenalt-images-table .button .dashicons {
    margin: 0;
    width: 18px;
    height: 18px;
    font-size: 18px;
    line-height: 18px;
}

.seenalt-table-wrap {
    border: 1px solid #dfe9f5;
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--seenalt-shadow);
    overflow: hidden;
}

.seenalt-images-table {
    border: 0 !important;
    margin: 0 !important;
}

.seenalt-images-table thead th,
.seenalt-images-table thead td {
    background: #f7fbff;
    border-bottom: 1px solid #dfe9f5 !important;
    color: #33465e;
}

.seenalt-images-table td,
.seenalt-images-table th {
    padding-top: 14px;
    padding-bottom: 14px;
}

.seenalt-images-table tbody tr:nth-child(odd) {
    background: #fcfdff;
}

.seenalt-images-table .column-actions {
    white-space: nowrap;
}

.seenalt-images-table .column-thumbnail {
    width: 80px;
}

.seenalt-images-table .column-actions {
    width: 150px;
}

.seenalt-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--seenalt-border-radius);
}

.seenalt-no-thumbnail {
    width: 60px;
    height: 60px;
    background: var(--seenalt-gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--seenalt-border-radius);
    color: var(--seenalt-gray-500);
}

.seenalt-attachment-id {
    color: var(--seenalt-gray-500);
    font-size: 12px;
}

.seenalt-url-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    word-break: break-all;
}

.seenalt-url-link .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* ==========================================================================
   History Table
   ========================================================================== */
.seenalt-filters {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.seenalt-filter-link {
    padding: 5px 15px;
    background: var(--seenalt-gray-100);
    border-radius: var(--seenalt-border-radius);
    text-decoration: none;
    color: var(--seenalt-gray-700);
}

.seenalt-filter-link.active,
.seenalt-filter-link:hover {
    background: var(--seenalt-primary);
    color: #fff;
}

.seenalt-history-table .column-thumbnail {
    width: 120px;
}

.seenalt-history-table .column-status {
    width: 100px;
}

.seenalt-attachment-info {
    display: flex;
    flex-direction: column;
    margin-top: 5px;
}

.seenalt-attachment-title {
    font-weight: 500;
}

.seenalt-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.seenalt-status-success {
    background: #d4edda;
    color: var(--seenalt-success);
}

.seenalt-status-error {
    background: #f8d7da;
    color: var(--seenalt-error);
}

.seenalt-alt-text {
    max-width: 300px;
    word-wrap: break-word;
}

.seenalt-old-alt {
    margin-top: 5px;
    font-size: 12px;
    color: var(--seenalt-gray-500);
    font-style: italic;
}

/* ==========================================================================
   Empty State
   ========================================================================== */
.seenalt-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border: 1px solid var(--seenalt-gray-300);
    border-radius: var(--seenalt-border-radius);
}

.seenalt-empty-icon {
    width: 80px;
    height: 80px;
    background: var(--seenalt-gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.seenalt-empty-icon .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: var(--seenalt-success);
}

.seenalt-empty-state h2 {
    margin-bottom: 10px;
}

.seenalt-empty-state p {
    color: var(--seenalt-gray-500);
    margin-bottom: 20px;
}

/* ==========================================================================
   Settings Form
   ========================================================================== */
.seenalt-settings-section {
    background: #fff;
    border: 1px solid var(--seenalt-gray-300);
    border-radius: var(--seenalt-border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--seenalt-shadow);
}

.seenalt-settings-section h2 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.seenalt-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: normal;
}


.seenalt-range-input {
    width: 200px;
    vertical-align: middle;
}

.seenalt-range-value {
    display: inline-block;
    width: 50px;
    text-align: center;
}

/* ==========================================================================
   Account Page
   ========================================================================== */
.seenalt-account-section {
    background: #fff;
    border: 1px solid var(--seenalt-gray-300);
    border-radius: var(--seenalt-border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--seenalt-shadow);
}

.seenalt-account-section h2 {
    margin-top: 0;
}

.seenalt-connection-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--seenalt-border-radius);
    font-weight: 500;
}

.seenalt-connected {
    background: #d4edda;
    color: var(--seenalt-success);
}

.seenalt-disconnected {
    background: #fff3cd;
    color: #856404;
}

.seenalt-license-form {
    max-width: 500px;
}

.seenalt-form-row {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.seenalt-form-row input {
    flex: 1;
}

.seenalt-license-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: var(--seenalt-border-radius);
}

.seenalt-no-license {
    margin-top: 15px;
    color: var(--seenalt-gray-500);
}

/* Plan Card */
.seenalt-plan-card {
    border: 2px solid var(--seenalt-primary);
    border-radius: var(--seenalt-border-radius);
    overflow: hidden;
}

.seenalt-plan-header {
    background: var(--seenalt-primary);
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.seenalt-plan-name {
    font-size: 20px;
    font-weight: 600;
}

.seenalt-plan-details {
    padding: 20px;
}

.seenalt-plan-stat {
    margin-bottom: 20px;
}

.seenalt-plan-stat:last-child {
    margin-bottom: 0;
}

.seenalt-plan-stat-label {
    font-size: 13px;
    color: var(--seenalt-gray-500);
    margin-bottom: 5px;
}

.seenalt-plan-stat-value {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.seenalt-credits-bar {
    height: 8px;
    background: var(--seenalt-gray-200);
    border-radius: 4px;
    overflow: hidden;
}

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

.seenalt-plan-reset {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--seenalt-gray-500);
    font-size: 13px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--seenalt-gray-200);
}

/* Plans Grid */
.seenalt-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.seenalt-plan-box {
    border: 1px solid var(--seenalt-gray-300);
    border-radius: var(--seenalt-border-radius);
    padding: 25px;
    text-align: center;
    position: relative;
}

.seenalt-plan-box.seenalt-plan-popular {
    border: 2px solid var(--seenalt-primary);
}

.seenalt-plan-box.seenalt-plan-current {
    background: var(--seenalt-gray-100);
}

.seenalt-plan-badge-popular {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--seenalt-primary);
    color: #fff;
    padding: 3px 15px;
    border-radius: 20px;
    font-size: 12px;
}

.seenalt-plan-box-header h3 {
    margin: 0 0 10px;
}

.seenalt-plan-price {
    margin-bottom: 20px;
}

.seenalt-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--seenalt-gray-700);
}

.seenalt-period {
    color: var(--seenalt-gray-500);
}

.seenalt-plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    text-align: left;
}

.seenalt-plan-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--seenalt-gray-200);
}

.seenalt-plan-features li:last-child {
    border-bottom: none;
}

.seenalt-plan-features .dashicons-yes {
    color: var(--seenalt-success);
}

.seenalt-plan-features .dashicons-no {
    color: var(--seenalt-gray-500);
}

/* ==========================================================================
   Modal
   ========================================================================== */
.seenalt-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
}

.seenalt-modal-content {
    background: #fff;
    border-radius: var(--seenalt-border-radius);
    padding: 30px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.seenalt-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: var(--seenalt-gray-500);
}

.seenalt-modal-close:hover {
    color: var(--seenalt-gray-700);
}

.seenalt-modal-body {
    text-align: center;
}

.seenalt-modal-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.seenalt-modal-icon.success {
    background: #d4edda;
}

.seenalt-modal-icon.error {
    background: #f8d7da;
}

.seenalt-modal-icon .dashicons {
    font-size: 30px;
    width: 30px;
    height: 30px;
}

.seenalt-modal-title {
    margin: 0 0 10px;
}

.seenalt-modal-message {
    color: var(--seenalt-gray-500);
    margin-bottom: 20px;
}

.seenalt-modal-details {
    background: var(--seenalt-gray-100);
    padding: 15px;
    border-radius: var(--seenalt-border-radius);
    text-align: left;
}

/* Processing Modal */
.seenalt-modal-processing {
    text-align: center;
}

.seenalt-processing-progress {
    margin: 20px 0;
}

.seenalt-processing-bar {
    height: 20px;
    background: var(--seenalt-gray-200);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

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

.seenalt-processing-text {
    color: var(--seenalt-gray-500);
}

.seenalt-processing-status {
    min-height: 20px;
    margin-bottom: 15px;
    color: var(--seenalt-gray-700);
}

/* ==========================================================================
   Notices
   ========================================================================== */
.seenalt-notice {
    padding: 15px;
    border-radius: var(--seenalt-border-radius);
    margin-bottom: 20px;
}

.seenalt-notice-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
}

.seenalt-notice p {
    margin: 0 0 10px;
}

/* ==========================================================================
   Stats Summary
   ========================================================================== */
.seenalt-stats-summary {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.seenalt-stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--seenalt-gray-500);
}

.seenalt-stat-success .dashicons {
    color: var(--seenalt-success);
}

.seenalt-stat-error .dashicons {
    color: var(--seenalt-error);
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.seenalt-pagination {
    margin-top: 20px;
    text-align: center;
}

.seenalt-pagination .page-numbers {
    display: inline-block;
    padding: 5px 12px;
    margin: 0 2px;
    background: #fff;
    border: 1px solid var(--seenalt-gray-300);
    border-radius: var(--seenalt-border-radius);
    text-decoration: none;
    color: var(--seenalt-gray-700);
}

.seenalt-pagination .page-numbers.current,
.seenalt-pagination .page-numbers:hover {
    background: var(--seenalt-primary);
    border-color: var(--seenalt-primary);
    color: #fff;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media screen and (max-width: 782px) {
    .seenalt-header-actions {
        position: static;
        margin-bottom: 20px;
    }

    .seenalt-cards-grid {
        grid-template-columns: 1fr 1fr;
    }

    .seenalt-actions-grid {
        grid-template-columns: 1fr;
    }

    .seenalt-plans-grid {
        grid-template-columns: 1fr;
    }

    .seenalt-form-row {
        flex-direction: column;
    }
}

@media screen and (max-width: 480px) {
    .seenalt-cards-grid {
        grid-template-columns: 1fr;
    }
}

