/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background-color: #f6f6f7;
    color: #202223;
    line-height: 1.5;
}

/* Admin Header */
.admin-header {
    background-color: #1a1a1a;
    color: #fff;
    height: 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 16px;
    border-right: 1px solid #3a3a3a;
}

.logo-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.logo-text {
    font-style: italic;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.search-container {
    display: flex;
    align-items: center;
    background-color: #303030;
    border-radius: 8px;
    padding: 8px 12px;
    max-width: 400px;
    flex: 1;
    gap: 8px;
}

.search-icon {
    font-size: 14px;
}

.admin-search {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 14px;
    flex: 1;
}

.admin-search::placeholder {
    color: #8a8a8a;
}

.search-shortcut {
    font-size: 12px;
    color: #8a8a8a;
    padding: 2px 6px;
    background-color: #404040;
    border-radius: 4px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icon-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.header-icon-btn:hover {
    background-color: #303030;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.user-profile:hover {
    background-color: #303030;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6900 0%, #ff8533 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
}

.user-badge {
    font-size: 11px;
    padding: 2px 6px;
    background-color: #404040;
    border-radius: 4px;
}

/* Admin Container */
.admin-container {
    display: flex;
    margin-top: 56px;
    min-height: calc(100vh - 56px);
}

/* Sidebar */
.admin-sidebar {
    width: 240px;
    background-color: #ebebeb;
    border-right: 1px solid #d4d5d7;
    padding: 12px 8px;
    position: fixed;
    left: 0;
    top: 56px;
    bottom: 0;
    overflow-y: auto;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #303030;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
    cursor: pointer;
}

.nav-item:hover {
    background-color: #e0e0e0;
    color: #202223;
}

.nav-item.active {
    background-color: #ffffff;
    color: #202223;
}

/* Special cursor for WEARFITS Try-On */
.nav-item:last-of-type {
    cursor: url('point-sm.png') 0 0, pointer;
}

/* Analytics notification indicator */
.analytics-item {
    position: relative;
    cursor: url('point-sm.png') 0 0, pointer;
}

/* WEARFITS Try-On notification indicator */
.wearfits-item {
    position: relative;
}

.notification-indicator {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
}

.notification-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background-color: #00cc00;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(0, 204, 0, 1), 0 0 6px rgba(0, 204, 0, 0.8);
    animation: pulse 2s ease-in-out infinite;
    z-index: 3;
}

.notification-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border: 2.5px solid #00cc00;
    border-radius: 50%;
    opacity: 0;
    animation: wave 2s ease-out infinite;
}

.notification-wave:nth-child(2) {
    animation-delay: 0s;
}

.notification-wave:nth-child(3) {
    animation-delay: 0.7s;
}

.notification-wave:nth-child(4) {
    animation-delay: 1.4s;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
}

@keyframes wave {
    0% {
        width: 10px;
        height: 10px;
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        width: 28px;
        height: 28px;
        opacity: 0;
    }
}

.nav-icon {
    font-size: 18px;
}

.nav-icon-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon-image img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
}

.nav-submenu {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-left: 42px;
    margin-bottom: 8px;
}

.nav-subitem {
    padding: 6px 12px;
    font-size: 14px;
    color: #616161;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.nav-subitem:hover {
    background-color: #e0e0e0;
    color: #202223;
}

.sidebar-section-title {
    font-size: 12px;
    font-weight: 600;
    color: #616161;
    padding: 16px 12px 8px 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.apps-header-clickable {
    cursor: url('point-sm.png') 0 0, pointer;
    position: relative;
    transition: color 0.2s;
}

.apps-header-clickable:hover {
    color: #202223;
}

.apps-notification-indicator {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
}

/* Main Content */
.admin-main {
    margin-left: 240px;
    flex: 1;
    padding: 24px;
    background-color: #f6f6f7;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.title-icon {
    font-size: 24px;
}

.page-actions {
    display: flex;
    gap: 12px;
}

.btn-secondary {
    background-color: #e8e8e9;
    border: none;
    color: #202223;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-secondary:hover {
    background-color: #d4d5d7;
}

.btn-primary {
    background-color: #202223;
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #303030;
}

/* Stats Cards */
.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background-color: #fff;
    border: 1px solid #e1e3e5;
    border-radius: 12px;
    padding: 16px;
}

.stat-header {
    margin-bottom: 12px;
}

.stat-period {
    font-size: 13px;
    color: #616161;
}

.stat-label {
    font-size: 13px;
    color: #616161;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #202223;
}

/* Tabs */
.tabs-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    background-color: #fff;
    border: 1px solid #e1e3e5;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    padding: 12px 16px;
}

.tabs {
    display: flex;
    gap: 8px;
}

.tab {
    background: transparent;
    border: none;
    color: #616161;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.tab:hover {
    background-color: #f6f6f7;
    color: #202223;
}

.tab.active {
    background-color: #f6f6f7;
    color: #202223;
}

.tab-add {
    background: transparent;
    border: none;
    color: #616161;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-add:hover {
    background-color: #f6f6f7;
}

.table-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.table-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #fff;
    border: 1px solid #c9cccf;
    border-radius: 8px;
    padding: 6px 12px;
    min-width: 250px;
}

.search-icon-small {
    font-size: 14px;
    color: #616161;
}

.table-search-input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    flex: 1;
    color: #202223;
}

.table-search-input::placeholder {
    color: #8a8a8a;
}

.icon-btn {
    background: transparent;
    border: 1px solid #c9cccf;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.icon-btn:hover {
    background-color: #f6f6f7;
}

/* Products Table */
.table-container {
    background-color: #fff;
    border: 1px solid #e1e3e5;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
}

.products-table thead {
    background-color: #f6f6f7;
}

.products-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #616161;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e1e3e5;
}

.products-table td {
    padding: 12px 16px;
    font-size: 14px;
    color: #202223;
    border-bottom: 1px solid #e1e3e5;
}

.products-table tbody tr:hover {
    background-color: #f9f9f9;
}

.col-checkbox {
    width: 40px;
}

.col-product {
    min-width: 300px;
}

.product-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #e1e3e5;
}

.badge-active {
    display: inline-block;
    padding: 4px 10px;
    background-color: rgba(82, 244, 144, 1);
    color: #1a1a1a;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

/* Scrollbar Styling */
.admin-sidebar::-webkit-scrollbar {
    width: 8px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: #c9cccf;
    border-radius: 4px;
}

.admin-sidebar::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e1e3e5;
}

.modal-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-icon {
    font-size: 24px;
}

.modal-icon-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon-image img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
}

.modal-title-text {
    font-size: 16px;
    font-weight: 600;
    color: #202223;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 24px;
    color: #616161;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #202223;
}

.modal-content {
    padding: 24px;
}

.modal-heading {
    font-size: 20px;
    font-weight: 600;
    color: #202223;
    margin-bottom: 12px;
}

.modal-description {
    font-size: 14px;
    color: #616161;
    line-height: 1.6;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e1e3e5;
}

.btn-modal-cancel {
    background-color: #fff;
    border: 1px solid #c9cccf;
    color: #202223;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-modal-cancel:hover {
    background-color: #f6f6f7;
}

.btn-modal-primary {
    background-color: #202223;
    border: none;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: url('point-sm.png') 0 0, pointer;
    transition: background-color 0.2s;
}

.btn-modal-primary:hover {
    background-color: #303030;
}

/* Button notification indicator */
.generate-btn-with-indicator {
    position: relative;
    padding-right: 50px;
}

.btn-notification-indicator {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
}

.progress-text {
    font-size: 14px;
    color: #202223;
    margin-bottom: 8px;
    font-weight: 500;
}

.progress-percentage {
    font-size: 13px;
    color: #616161;
}

.success-icon {
    font-size: 64px;
    text-align: center;
    margin-bottom: 20px;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.success-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 20px 0;
}

.stat-box {
    padding: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.success-box {
    background-color: #e8f5f1;
    border: 1px solid #b3e5d8;
}

.failed-box {
    background-color: #f0f0f1;
    border: 1px solid #d4d5d7;
}

.stat-icon {
    font-size: 18px;
}

.stat-value {
    font-size: 14px;
    font-weight: 600;
    color: #202223;
}

.success-message {
    background-color: #e8f5f1;
    border: 1px solid #b3e5d8;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #1a5c3a;
    line-height: 1.5;
}

.info-icon {
    font-size: 18px;
    flex-shrink: 0;
}

/* Process Flow Visualization */
.process-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    padding: 24px;
    background: linear-gradient(135deg, #f6f6f7 0%, #ebebeb 100%);
    border-radius: 12px;
    border: 1px solid #e1e3e5;
}

.process-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.process-icon {
    font-size: 48px;
    background: #fff;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.process-icon:hover {
    transform: scale(1.05);
}

.process-label {
    font-size: 13px;
    font-weight: 600;
    color: #202223;
    text-align: center;
}

.process-arrow {
    font-size: 32px;
    color: #ff6900;
    font-weight: bold;
    margin: 0 10px;
}

/* Green Progress Bar */
.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: #e1e3e5;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 16px;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(82, 244, 144, 1) 0%, rgba(50, 200, 100, 1) 100%);
    border-radius: 4px;
    transition: width 0.2s linear;
    box-shadow: 0 0 10px rgba(82, 244, 144, 0.5);
}

/* Arrow indicator for chart growth */
.arrow-indicator {
    display: inline-block;
    font-size: 48px;
    color: #00cc00;
    margin-left: 16px;
    animation: arrowBlink 1.5s ease-in-out infinite;
    text-shadow: 0 0 12px rgba(0, 204, 0, 0.8);
    vertical-align: middle;
}

@keyframes arrowBlink {
    0%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-8px);
    }
}

/* Apps Search Modal */
.apps-search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
}

.apps-search-container {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.apps-search-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e1e3e5;
    gap: 12px;
}

.apps-search-icon {
    font-size: 18px;
    color: #616161;
}

.apps-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    color: #202223;
}

.apps-search-input::placeholder {
    color: #8a8a8a;
}

.apps-search-close {
    background: transparent;
    border: none;
    font-size: 24px;
    color: #616161;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.apps-search-close:hover {
    color: #202223;
}

.apps-search-filters {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    border-bottom: 1px solid #e1e3e5;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 6px 12px;
    background-color: #f6f6f7;
    border: 1px solid #e1e3e5;
    border-radius: 16px;
    font-size: 13px;
    color: #202223;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-chip:hover {
    background-color: #e8e8e9;
}

.apps-search-content {
    padding: 60px 20px;
    text-align: center;
}

.search-icon-large {
    font-size: 64px;
    color: #d4d5d7;
    margin-bottom: 16px;
}

.search-placeholder-text {
    font-size: 16px;
    color: #616161;
}

.apps-search-results {
    padding: 0;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #e1e3e5;
}

.search-result-with-indicator {
    cursor: url('point-sm.png') 0 0, pointer;
    position: relative;
}

.search-result-item:hover {
    background-color: #f6f6f7;
}

.search-result-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    padding: 3px;
}

.search-result-info {
    flex: 1;
}

.search-result-title {
    font-size: 14px;
    font-weight: 600;
    color: #202223;
    margin-bottom: 4px;
}

.search-result-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.search-result-rating {
    color: #202223;
}

.search-result-plan {
    color: #616161;
}

.search-result-notification {
    position: relative;
    width: 18px;
    height: 18px;
    margin-right: 8px;
}

.search-result-external {
    font-size: 18px;
    color: #616161;
}

/* Responsive */
@media (max-width: 1024px) {
    .admin-sidebar {
        width: 200px;
    }

    .admin-main {
        margin-left: 200px;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        margin: 20px;
    }

    .modal-header,
    .modal-content,
    .modal-footer {
        padding: 16px;
    }

    .process-flow {
        flex-direction: column;
        gap: 12px;
    }

    .process-arrow {
        transform: rotate(90deg);
        margin: 0;
    }

    .process-icon {
        width: 60px;
        height: 60px;
        font-size: 36px;
    }
}
