@font-face {
    font-family: 'SF';
    src: url('../font/sf.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Wrapper class for scoping styles */
.imei-plugin-wrapper {
    /* Root variables */
    --primary: #10B981;
    --primary-dark: #059669;
    --primary-gradient: linear-gradient(135deg, #10B981 0%, #059669 100%);
    --success: #059669;
    --error: #DC2626;
    --text: #111827;
    --text-light: #4B5563;
    --bg: #F1F5F9;
    --border: #E2E8F0;
    --card-bg: rgba(255, 255, 255, 0.9);
    --shadow: 0 2px 8px -2px rgba(0,0,0,0.05);
    --hover-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
    --font-family: 'SF', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

    /* Reset styles for plugin elements */
    * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
        font-family: var(--font-family);
    }

    .imei-tabs {
        margin-top: 20px;
    }

    .imei-tab-content {
        display: none;
    }

    .imei-tab-content.active {
        display: block;
    }

    .imei-container {
        padding: 2rem;
        border-radius: 1rem;
        margin-bottom: 10px;
    }

    .imei-form {
        max-width: 600px;
        margin: 2rem auto;
        padding: 2.5rem;
        background: white;
        border-radius: 1rem;
        box-shadow: var(--shadow);
        transition: all 0.3s ease;
    }

    .imei-form div {
        margin-bottom: 1.5rem;
    }

    .imei-form label {
        display: block;
        font-weight: 500;
        color: var(--text);
        margin-bottom: 0.5rem;
        font-size: 0.938rem;
    }

    .imei-form input {
        width: 100%;
        padding: 0.875rem 1rem;
        border: 1px solid var(--border);
        border-radius: 12px;
        font-size: 0.938rem;
        background: white;
        color: var(--text);
        transition: all 0.2s;
    }

    .imei-form input:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    }

    .imei-form button {
        width: 100%;
        padding: 0.875rem 1.5rem;
        background: var(--primary);
        color: white;
        border: none;
        border-radius: 0.75rem;
        font-weight: 500;
        font-size: 0.9375rem;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .imei-form button:hover {
        background: var(--primary-dark);
        transform: translateY(-1px);
    }

    .imei-form button.update-mode {
        background: var(--success);
    }

    .imei-table {
        border-collapse: separate;
        border-spacing: 0;
        width: 100%;
        margin: 1rem 0;
        background: rgba(255,255,255,0.5);
        border-radius: 16px;
        overflow: hidden;
        box-shadow: var(--shadow);
        margin-top: 0;
        border: 1px solid var(--border);
        border-radius: 16px;
        overflow: hidden;
        background: white;
    }

    .imei-table th {
        text-transform: uppercase;
        font-size: 0.75rem;
        font-weight: 600;
        letter-spacing: 0.05em;
        color: var(--text-light);
        background: rgba(255,255,255,0.8);
        padding: 1.25rem 1rem;
        background: var(--bg);
        font-weight: 600;
        padding: 1rem 1.25rem;
        color: var(--text);
        border-bottom: 2px solid var(--border);
    }

    .imei-table td {
        padding: 1rem;
        border-bottom: 1px solid var (--border);
        font-size: 0.938rem;
        transition: all 0.2s;
        color: var(--text);
        background: white;
        padding: 1rem 1.25rem;
        border-bottom: 1px solid var(--border);
    }

    .imei-table tr:hover td {
        background: rgba(255,255,255,0.9);
    }

    .imei-table tr:last-child td {
        border-bottom: none;
    }

    .imei-message {
        margin-top: 1.5rem;
        padding: 1rem 1.5rem;
        border-radius: 0.75rem;
        font-weight: 500;
        animation: slideUp 0.3s ease;
        direction: rtl;
        opacity: 0;
        transform: translateY(10px);
        animation: slideIn 0.3s ease forwards;
        font-size: 0.938rem;
        background: white;
    }

    .imei-success {
        background: #ECFDF5;
        color: var(--success);
        border: 1px solid #A7F3D0;
    }

    .imei-error {
        background: #FEF2F2;
        color: var(--error);
        border: 1px solid #FECACA;
    }

    .imei-status {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 0.875rem;
        font-weight: 500;
    }

    .imei-status.received {
        background-color: #ECFDF5;
        color: var (--success);
        border: 1px solid #A7F3D0;
    }

    .imei-status.not-received {
        background-color: #FEF3C7;
        color: #D97706;
        border: 1px solid #FCD34D;
    }

    .nav-tab-wrapper {
        display: flex;
        gap: 1rem;
        padding: 0;
        border: none;
        margin-bottom: 2rem;
        direction: rtl;
    }

    .nav-tab {
        padding: 0.75rem 1.5rem;
        border: none;
        border-radius: 0.5rem;
        font-weight: 500;
        color: var(--text-light);
        background: white;
        transition: all 0.2s;
        float: right;
        margin-right: 0;
        margin-left: .5em;
    }

    .nav-tab:hover,
    .nav-tab.nav-tab-active {
        background: var(--primary);
        color: white;
    }

    .search-box {
        position: relative;
        max-width: 400px;
        margin-bottom: 2rem;
    }

    .search-box input {
        width: 100%;
        padding: 0.75rem 1rem 0.75rem 2.5rem;
        border: 1px solid var(--border);
        border-radius: 0.5rem;
        font-size: 1rem;
    }

    .search-box svg {
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-light);
    }

    .log-entry {
        background: white;
        padding: 1.5rem;
        border-radius: 0.5rem;
        margin-bottom: 1rem;
        box-shadow: var(--shadow);
        border: 1px solid var(--border);
        border-radius: 0.75rem;
        padding: 1.25rem;
        margin-bottom: 1rem;
        transition: all 0.2s ease;
        color: var(--text);
        font-size: 0.938rem;
        position: relative;
        padding-right: 2.5rem;
    }

    .log-entry:hover {
        background: var(--bg);
        border-color: var(--primary);
    }

    .log-entry p {
        margin: 0.5rem 0;
        color: var(--text);
    }

    .log-delete-btn {
        position: absolute;
        top: 1rem;
        right: 1rem;
        width: 24px;
        height: 24px;
        border: none;
        background: none;
        color: var(--text-light);
        cursor: pointer;
        opacity: 0.5;
        transition: all 0.2s;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .log-delete-btn:hover {
        opacity: 1;
        color: var(--error);
    }

    .clear-logs-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 1.25rem;
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: 12px;
        color: var(--text);
        cursor: pointer;
        transition: all 0.2s;
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }

    .clear-logs-btn:hover {
        background: #fee2e2;
        border-color: #fecaca;
        color: var(--error);
    }

    .loading {
        position: relative;
        pointer-events: none;
    }

    .loading::after {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(255,255,255,0.8) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle fill="none" stroke="%234F46E5" stroke-width="8" stroke-dasharray="160" stroke-dashoffset="20" cx="50" cy="50" r="35"><animateTransform attributeName="transform" type="rotate" from="0 50 50" to="360 50 50" dur="1s" repeatCount="indefinite"/></circle></svg>') center/40px no-repeat;
    }

    /* Dashboard Layout */
    .imei-dashboard {
        margin: -20px;
        padding: 2rem;
        min-height: calc(100vh - 32px);
        background: #efefef;
        font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    }

    .imei-wrapper {
        display: grid;
        grid-template-columns: 220px 1fr;
        gap: 2rem;
        max-width: 1400px;
        margin: 0 auto;
    }

    /* Sidebar */
    .imei-sidebar {
        background: var(--card-bg);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border-radius: 24px;
        padding: 1.5rem;
        position: sticky;
        top: 48px;
        height: fit-content;
        border: 1px solid rgba(255,255,255,0.5);
       
    }

    .imei-sidebar-header {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding-bottom: 1.25rem;
        margin-bottom: 1.25rem;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        font-size: 1rem;
        font-weight: 600;
        color: var(--text);
    }

    .imei-sidebar-header span {
        flex: 1;
        white-space: nowrap;
    }

    .imei-sidebar-nav {
        display: flex;
        flex-direction: column;
        gap: 0.375rem;
    }

    .imei-nav-item {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.875rem 1rem;
        margin-bottom: 0.5rem;
        border-radius: 12px;
        color: var(--text);
        font-size: 0.9375rem;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        font-weight: 500;
    }

    .imei-nav-item:hover {
        transform: translateX(-4px);
        background: rgba(255,255,255,0.9);
    }

    .imei-nav-item.active {
        background: var(--primary-gradient);
        color: white;
        box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
        font-weight: 600;
    }

    .imei-nav-item svg {
        width: 18px;
        height: 18px;
    }

    /* Main Content */
    .imei-main-content {
        flex: 1;
        min-width: 0;
    }

    /* Sidebar */
    .imei-sidebar {
        background: rgba(255,255,255,0.8);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-left: 1px solid rgba(0,0,0,0.1);
        padding: 1.5rem;
    }

    .imei-sidebar-header {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding-bottom: 1.5rem;
        margin-bottom: 1.5rem;
        border-bottom: 1px solid var(--border);
        font-weight: 600;
        font-size: 1.125rem;
        color: var(--text);
    }

    .imei-sidebar-nav {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .imei-nav-item {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
        border-radius: 0.75rem;
        color: var(--text);
        text-decoration: none;
        transition: all 0.2s ease;
        margin-bottom: 0.5rem;
    }

    .imei-nav-item:hover,
    .imei-nav-item.active {
        background: var(--primary);
        color: white;
    }

    /* Main Content */
    .imei-main-content {
        padding: 2rem;
    }

    .imei-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 2rem;
    }

    .imei-header h1 {
        font-size: 1.75rem;
        font-weight: 600;
        color: var(--text);
        margin: 0;
        letter-spacing: -0.02em;
    }

    .imei-search {
        position: relative;
        width: 300px;
    }

    .imei-search svg {
        position: absolute;
        right: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-light);
    }

    .imei-search input {
        padding: 0.5rem 2.5rem 0.5rem 1rem;
        border: 1px solid var(--border);
        border-radius: 0.5rem;
        width: 300px;
        width: 100%;
        padding: 0.875rem 2.5rem 0.875rem 1rem;
        border: none;
        border-radius: 12px;
        background: rgba(255,255,255,0.5);
        backdrop-filter: blur(10px);
        font-size: 0.938rem;
        transition: all 0.3s;
        color: var(--text);
        background: white;
        background: var(--bg);
        border: 2px solid var(--border);
        border-radius: 12px;
        padding: 0.875rem 2.75rem 0.875rem 1rem;
        width: 100%;
        transition: all 0.3s ease;
    }

    .imei-search input:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(0,113,227,0.1);
        background: white;
        box-shadow: var(--card-shadow);
        background: white;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    }

    /* Cards */
    .imei-card {
        background: var(--card-bg);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border-radius: 24px;
        padding: 2rem;
        border: 1px solid rgba(255,255,255,0.5);
        box-shadow: var(--card-shadow);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        margin-bottom: 1.5rem;
    }

    .imei-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--hover-shadow);
    }

    .imei-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem;
        border-bottom: 1px solid var(--border);
    }

    .imei-card-header h2 {
        font-size: 1.25rem;
        font-weight: 600;
        color: var(--primary-dark);
        margin: 0;
        font-family: var(--font-family);
    }

    .imei-form-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    /* Stats Grid */
    .imei-stats-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
        margin-top: 1rem;
    }

    .imei-stat-card {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1.5rem;
        background: white;
        border-radius: 0.75rem;
        box-shadow: var(--shadow);
    }

    .stat-icon {
        padding: 0.75rem;
        border-radius: 0.5rem;
        display: flex;
    }

    .stat-icon.success {
        background: #ECFDF5;
        color: var(--success);
    }

    .stat-info {
        display: flex;
        flex-direction: column;
    }

    .stat-label {
        color: var(--text-light);
        font-size: 0.875rem;
    }

    .stat-value {
        font-size: 1.5rem;
        font-weight: 600;
        color: var(--text);
    }

    /* Table Improvements */
    .imei-table-wrapper {
        overflow-x: auto;
        margin: 1rem -1.5rem -1.5rem;
    }

    .imei-icon-button {
        width: 32px;
        height: 32px;
        padding: 0;
        border: none;
        background: var(--bg);
        border-radius: 8px;
        color: var(--text);
        cursor: pointer;
        transition: all 0.2s ease;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: 0.5rem;
    }

    .imei-icon-button:hover {
        background: var(--primary);
        color: white;
        transform: translateY(-1px);
    }

    .imei-icon-button.delete:hover {
        background: var(--error);
    }

    /* Button Updates */
    .imei-button {
        background: var(--primary-gradient);
        color: white;
        padding: 1rem 1.5rem;
        border-radius: 12px;
        border: none;
        font-weight: 600;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
        margin-top: 0;
        margin-bottom: 0;
    }

    .imei-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(79, 70, 229, 0.3);
        background: var(--primary-dark);
    }

    .imei-button-group {
        display: flex;
        gap: 1rem;
        margin-top: 1rem;
    }

    #imei-cancel {
        background: var(--bg);
        color: var(--text);
        border: 1px solid var(--border);
    }

    #imei-cancel:hover {
        background: var(--border);
    }

    /* Logo Styles */
    .imei-logo {
        width: 28px;
        height: 28px;
        object-fit: contain;
        display: block;
        flex-shrink: 0;
    }

    /* WordPress Admin Menu Icon */
    .toplevel_page_imei-activation .wp-menu-image img {
        width: 20px;
        height: 20px;
        padding: 7px 0 0 0 !important;
    }

    /* Frontend Form Styles */
    .imei-container {
        max-width: min(500px, 100%);
        margin: 1rem auto;
        padding: 1rem;
        box-sizing: border-box;
    }

    .imei-form {
        width: 100%;
        padding: 2rem;
        background: white;
        border-radius: 20px;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    }

    .imei-form * {
        box-sizing: border-box;
    }

    .imei-form-group {
        margin-bottom: 1.5rem;
        width: 100%;
    }

    .imei-form-group:last-of-type {
        margin-bottom: 0;
    }

    .imei-form-group label {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
        color: var(--text);
        font-size: 0.875rem;
        font-weight: 600;
    }

    .imei-input-wrapper {
        position: relative;
        width: 100%;
    }

    .imei-input-wrapper svg {
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        width: 20px;
        height: 20px;
        pointer-events: none;
        color: var(--text-light);
        stroke: currentColor;
        opacity: 0.5;
        transition: all 0.3s;
        display: block !important;
        z-index: 1;
    }

    .imei-input-wrapper input:focus + svg {
        color: var(--primary);
        opacity: 1;
    }

    .imei-input-wrapper input {
        width: 100%;
        padding: 1rem 3rem 1rem 1rem;
        border: 2px solid var(--border);
        border-radius: 16px;
        font-size: 1rem;
        background: white;
        transition: all 0.25s ease;
        padding-right: 2.75rem !important; /* فضا برای آیکن */
    }

    .imei-input-wrapper input:focus {
        border-color: var(--primary);
    }

    .imei-input-wrapper input:focus + svg {
        color: var (--primary);
        opacity: 1;
    }

    .imei-form-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        width: 100%;
    }

    .imei-form-row:last-of-type {
        margin-bottom: 0;
    }

    .imei-button {
        width: 100%;
        padding: 1.125rem;
        border-radius: 16px;
        font-size: 1rem;
        margin-top: 1rem;
        margin-top: 0;
        margin-bottom: 0;
    }

    .imei-header-actions {
        display: flex;
        gap: 1rem;
        align-items: center;
    }

    .imei-import-export {
        display: flex;
        gap: 0.5rem;
    }

    .imei-button.secondary {
        background: var(--bg);
        color: var(--text);
        border: 1px solid var(--border);
        padding: 0.5rem 1rem;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.875rem;
    }

    .imei-button.secondary:hover {
        background: var(--border);
        transform: translateY(-1px);
        box-shadow: none;
    }

    /* Mobile Responsive */
    @media (max-width: 640px) {
        .imei-container {
            padding: 0.5rem;
            margin: 0.5rem auto;
        }

        .imei-form {
            padding: 1.25rem;
            border-radius: 16px;
        }

        .imei-form-row {
            grid-template-columns: 1fr;
        }

        .imei-input-wrapper input {
            padding: 0.875rem 1rem;
            font-size: 0.9375rem;
        }

        .imei-button {
            padding: 1rem;
        }

        .imei-form-group label {
            font-size: 0.8125rem;
        }
    }

    /* RTL Support */
    [dir="rtl"] .imei-form-group label svg {
        margin-left: 0.5rem;
        margin-right: 0;
    }

    /* Prevent overflow */
    .imei-form input,
    .imei-form button,
    .imei-message {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .imei-message {
        margin: 1.5rem 0;
        padding: 1rem;
        border-radius: 12px;
        width: 100%;
        word-wrap: break-word;
    }

    /* Frontend Form Styles */
    .imei-container {
        max-width: 500px;
        margin: 2rem auto;
        padding: 0 1rem;
    }

    .imei-form-title {
        text-align: center;
        font-size: 1.75rem;
        color: var(--text);
        font-weight: 700;
        margin: 0 0 2rem 0;
    }

    .imei-form {
        background: white;
        padding: 2rem;
        border-radius: 20px;
    }

    .imei-form-group {
        margin-bottom: 1.75rem;
    }

    .imei-form-group label {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
        color: var(--text);
        font-size: 0.875rem;
        font-weight: 600;
    }

    .imei-form-group label svg {
        width: 16px;
        height: 16px;
        color: var(--primary);
        opacity: 0.8;
    }

    .imei-input-wrapper {
        position: relative;
    }

    .imei-input-wrapper svg {
        display: none;
    }

    .imei-input-wrapper input {
        width: 100%;
        padding: 1.125rem 1.25rem;
        border: 2px solid var(--border);
        border-radius: 16px;
        font-size: 1rem;
        background: white;
        transition: all 0.25s ease;
        appearance: none;
        -webkit-appearance: none;
    }

    .imei-input-wrapper input:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    }

    /* Remove default validation styles */
    .imei-input-wrapper input:invalid {
        box-shadow: none;
        border-color: var(--border);
        background: white;
    }

    .imei-input-wrapper input:valid {
        border-color: var(--border);
        background: white;
    }

    /* Custom validation styles - only show on focus */
    .imei-input-wrapper input:focus:valid {
        border-color: var(--primary);
        background: white;
    }

    .imei-input-wrapper input:focus:invalid {
        border-color: var(--border);
        background: white;
    }

    .imei-button {
        width: 100%;
        padding: 1.125rem;
        background: var(--primary);
        color: white;
        border: none;
        border-radius: 20px;
        font-weight: 600;
        font-size: 1.125rem;
        cursor: pointer;
        transition: all 0.3s;
        margin-top: 1rem;
    }

    .imei-message {
        margin-top: 1.5rem;
        padding: 1.25rem;
        border-radius: 16px;
        font-size: 1rem;
        display: flex;
        align-items: center;
        gap: 1rem;
        line-height: 1.5;
        background: white;
    }

    .imei-success {
        background: #ECFDF5;
        color: var(--success);
        border: 1px solid #A7F3D0;
    }

    .imei-error {
        background: #FEF2F2;
        color: var(--error);
        border: 1px solid #FECACA;
    }

    /* بهبود استایل پیام موفقیت */
    .imei-message.imei-success {
        padding: 2rem;
        background: var(--card-bg);
        border-radius: 12px;
        box-shadow: var(--shadow);
        margin: 2rem 0;
    }

    .imei-message .activation-info {
        text-align: center;
    }

    .imei-message .activation-info h3 {
        font-size: 1.5rem;
        color: var(--text);
        margin-bottom: 1rem;
    }

    .imei-message .activation-code {
        font-size: 2.5rem;
        font-weight: bold;
        color: var(--primary);
        padding: 1rem;
        background: rgba(16, 185, 129, 0.1);
        border-radius: 8px;
        margin: 1rem 0;
        letter-spacing: 2px;
        direction: ltr;
    }

    .imei-message .timer {
        font-size: 1.25rem;
        color: var(--text-light);
        margin-top: 1rem;
    }

    .imei-message .timer span {
        font-weight: bold;
        color: var(--primary);
    }

    /* تنظیمات موبایل */
    @media (max-width: 640px) {
        .imei-message.imei-success {
            padding: 1.5rem;
        }

        .imei-message .activation-info h3 {
            font-size: 1.25rem;
        }

        .imei-message .activation-code {
            font-size: 2rem;
            padding: 0.75rem;
        }

        .imei-message .timer {
            font-size: 1.1rem;
        }
    }

    /* Loading State */
    .imei-form.loading .imei-button {
        opacity: 0.7;
        pointer-events: none;
        position: relative;
    }

    .imei-form.loading .imei-button::after {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(255,255,255,0.2);
    }

    /* RTL Specific */
    .imei-container {
        direction: rtl;
    }

    .imei-message svg {
        margin-left: 0.5rem;
    }

    /* Simplified Frontend Form Styles */
    .imei-container {
        max-width: 500px;
        margin: 2rem auto;
        padding: 0 1rem;
    }

    .imei-container .imei-card {
        background: white;
        border-radius: 24px;
        padding: 2rem;
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.03);
        border: 1px solid var(--border);
    }

    .imei-container .imei-card-header {
        text-align: center;
        margin-bottom: 2rem;
        border: none;
        padding: 0;
    }

    .imei-container .imei-card-header h2 {
        font-size: 1.75rem;
        color: var(--text);
        font-weight: 700;
        margin: 0;
    }

    .imei-form-group {
        margin-bottom: 1.5rem;
    }

    .imei-form-group label {
        display: block;
        margin-bottom: 0.625rem;
        color: var (--text);
        font-size: 0.875rem;
        font-weight: 600;
    }

    .imei-input-wrapper {
        position: relative;
    }

    .imei-input-wrapper svg {
        position: absolute;
        right: 1.25rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-light);
        opacity: 0.5;
        width: 20px;
        height: 20px;
        transition: all 0.2s;
    }

    .imei-input-wrapper input {
        width: 100%;
        padding: 1rem 3.25rem 1rem 1.25rem;
        border: 2px solid var(--border);
        border-radius: 16px;
        font-size: 1rem;
        background: white;
        transition: all 0.3s;
    }

    .imei-input-wrapper input:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
    }

    .imei-input-wrapper input:focus + svg {
        color: var(--primary);
        opacity: 1;
    }

    .imei-form-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .imei-button {
        width: 100%;
        padding: 1.125rem;
        background: var(--primary);
        color: white;
        border: none;
        border-radius: 20px;
        font-weight: 600;
        font-size: 1.125rem;
        cursor: pointer;
        transition: all 0.3s;
        margin-top: 1rem;
    }

    .imei-button:hover {
        background: var(--primary-dark);
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
    }

    .imei-message {
        margin-top: 1.5rem;
        padding: 1.25rem;
        border-radius: 16px;
        font-size: 1rem;
        display: flex;
        align-items: center;
        gap: 1rem;
        line-height: 1.5;
    }

    @media (max-width: 640px) {
        .imei-form-row {
            grid-template-columns: 1fr;
            gap: 1rem;
        }
        
        .imei-container .imei-card {
            padding: 1.5rem;
            border-radius: 20px;
        }
        
        .imei-input-wrapper input {
            padding: 0.875rem 3rem 0.875rem 1rem;
            font-size: 1rem;
            border-radius: 14px;
        }
        
        .imei-button {
            padding: 1rem;
            border-radius: 14px;
        }
    }

    /* Override any browser default styles */
    .imei-form input:-webkit-autofill,
    .imei-form input:-webkit-autofill:hover,
    .imei-form input:-webkit-autofill:focus {
        -webkit-box-shadow: 0 0 0px 1000px white inset;
        transition: background-color 5000s ease-in-out 0s;
    }

    /* Frontend Form Responsive Fixes */
    .imei-container {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
        padding: 1rem;
        box-sizing: border-box;
    }

    .imei-form {
        width: 100%;
        padding: 1.5rem;
        margin: 0;
        box-sizing: border-box;
    }

    /* Mobile Responsive */
    @media (max-width: 640px) {
        .imei-container {
            max-width: 100%;
            padding: 0.5rem;
            margin: 0;
        }

        .imei-form {
            padding: 1rem;
            border-radius: 12px;
        }

        .imei-form-group {
            margin-bottom: 1rem;
        }

        .imei-input-wrapper input {
            width: 100%;
            max-width: none;
            box-sizing: border-box;
        }

        .imei-form-row {
            grid-template-columns: 1fr;
            gap: 1rem;
        }

        .imei-button {
            width: 100%;
            margin-top: 0.5rem;
        }

        .imei-message {
            margin: 1rem 0;
            width: 100%;
            box-sizing: border-box;
        }
    }

    /* Fix width calculations */
    *, *:before, *:after {
        box-sizing: border-box;
    }

    /* Frontend Form Fixes */
    .imei-container {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
        padding: 1rem;
        box-sizing: border-box;
    }

    .imei-input-wrapper input {
        width: 100%;
        padding: 1rem;
        border: 2px solid var(--border);
        border-radius: 16px;
        font-size: 1rem;
        background: white;
        transition: all 0.25s ease;
    }

    @media (max-width: 640px) {
        .imei-container {
            max-width: 100%;
            padding: 0.75rem;
        }

        .imei-form {
            padding: 1rem;
            border-radius: 12px;
            width: 100%;
        }

        .imei-input-wrapper input {
            padding: 0.875rem 1rem;
            border-radius: 12px;
        }

        .imei-form-group label {
            margin-bottom: 0.5rem;
        }

        .imei-button {
            border-radius: 12px;
        }

        .imei-message {
            margin: 1rem 0;
            padding: 1rem;
            border-radius: 12px;
        }
    }

    /* Admin Form Styles */
    #imei-add-form.imei-form {
        max-width: 100%;
        margin: 0;
        padding: 1.5rem;
        width: 100%;
        box-sizing: border-box;
    }

    #imei-add-form .imei-form-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        width: 100%;
    }

    #imei-add-form .imei-form-group {
        margin-bottom: 1.5rem;
        width: 100%;
    }

    #imei-add-form .imei-input-wrapper input {
        width: 100%;
        padding: 1rem 1.25rem;
        box-sizing: border-box;
    }

    #imei-add-form .imei-button-group {
        display: flex;
        gap: 1rem;
        margin-top: 1rem;
    }

    #imei-add-form .imei-button-group button {
        flex: 1;
        max-width: none;
    }

    @media (max-width: 768px) {
        #imei-add-form .imei-form-row {
            grid-template-columns: 1fr;
        }
    }

    /* Loading states for search */
    .imei-table tbody.loading,
    #log-results.loading {
        position: relative;
        min-height: 200px;
        opacity: 0.7;
    }

    .imei-table tbody.loading::after,
    #log-results.loading::after {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(255,255,255,0.8) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle fill="none" stroke="%234F46E5" stroke-width="8" stroke-dasharray="160" stroke-dashoffset="20" cx="50" cy="50" r="35"><animateTransform attributeName="transform" type="rotate" from="0 50 50" to="360 50 50" dur="1s" repeatCount="indefinite"/></circle></svg>') center/40px no-repeat;
    }

    .imei-pagination {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 2rem;
        padding: 1rem;
    }

    .imei-pagination-button {
        padding: 0.5rem 1rem;
        border: 1px solid var(--border);
        background: white;
        color: var(--text);
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s;
        min-width: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .imei-pagination-button:hover {
        background: var(--bg);
        border-color: var(--primary);
        color: var(--primary);
    }

    .imei-pagination-button.active {
        background: var(--primary);
        border-color: var(--primary);
        color: white;
    }

    .imei-pagination-button.disabled {
        opacity: 0.5;
        cursor: not-allowed;
        pointer-events: none;
    }

    .imei-form-tabs {
        display: flex;
        gap: 1rem;
        margin-bottom: 2rem;
        justify-content: center;
    }

    .imei-tab-button {
        padding: 0.75rem 1.5rem;
        border: 2px solid var(--border);
        background: var(--bg);
        border-radius: 12px;
        color: var(--text);
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .imei-tab-button.active {
        background: var(--primary);
        border-color: var(--primary);
        color: white;
    }

    .checkbox-label {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        cursor: pointer;
    }

    .checkbox-label input[type="checkbox"] {
        width: 1.25rem;
        height: 1.25rem;
        border: 2px solid var(--border);
        border-radius: 4px;
        cursor: pointer;
    }

    .warranty-status {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 0.875rem;
    }

    .warranty-status.pending {
        background-color: #FEF3C7;
        color: #D97706;
        border: 1px solid #FCD34D;
    }

    .warranty-status.approved {
        background-color: #D1FAE5;
        color: #059669;
        border: 1px solid #A7F3D0;
    }

    .warranty-status svg {
        width: 16px;
        height: 16px;
    }

    .approve-warranty.loading {
        opacity: 0.7;
        cursor: wait;
    }

    .warranty-actions {
        white-space: nowrap;
    }

    .action-buttons {
        display: flex;
        gap: 8px;
        justify-content: flex-start;
        align-items: center;
    }

    .imei-icon-button {
        padding: 6px;
        border: 1px solid #ddd;
        border-radius: 4px;
        background: #fff;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .imei-icon-button:hover {
        border-color: #2271b1;
        color: #2271b1;
    }

    .imei-icon-button.approve-warranty {
        color: #28a745;
        border-color: #28a745;
    }

    .imei-icon-button.approve-warranty:hover {
        background-color: #28a745;
        color: #fff;
    }

    .imei-icon-button.delete-warranty {
        color: #dc3545;
        border-color: #dc3545;
    }

    .imei-icon-button.delete-warranty:hover {
        background-color: #dc3545;
        color: #fff;
    }

    .date-picker-wrapper {
        display: flex;
        gap: 10px;
        align-items: center;
        direction: rtl;
    }

    .date-picker-wrapper input[type="number"],
    .date-picker-wrapper select {
        padding: 12px 15px;
        border: 2px solid var(--border);
        border-radius: 12px;
        font-size: 0.938rem;
        background-color: white;
        color: var(--text);
        transition: all 0.2s ease;
        cursor: pointer;
        height: 48px;
    }
    
    .date-picker-wrapper input[type="number"] {
        width: 80px;
        text-align: center;
    }
    
    .date-picker-wrapper select {
        flex: 1;
        padding-left: 30px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%234B5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: left 8px center;
        background-size: 18px;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }

    .date-picker-wrapper input[type="number"]:focus,
    .date-picker-wrapper select:focus {
        border-color: var(--primary);
        outline: none;
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    }

    .date-picker-wrapper input[type="number"]:hover,
    .date-picker-wrapper select:hover {
        border-color: var(--primary);
    }

    .date-picker-wrapper input[type="number"]::-webkit-inner-spin-button,
    .date-picker-wrapper input[type="number"]::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    .date-picker-wrapper input[type="number"] {
        appearance: textfield;
        -webkit-appearance: textfield;
        -moz-appearance: textfield;
    }

    .date-picker-wrapper select::-ms-expand {
        display: none;
    }

    @media (max-width: 480px) {
        .date-picker-wrapper {
            flex-direction: column;
            gap: 8px;
        }
        
        .date-picker-wrapper input[type="number"],
        .date-picker-wrapper select {
            width: 100%;
            height: 44px;
            padding: 10px 12px;
        }
    }

    .input-help {
        display: block;
        margin-top: 0.5rem;
        color: var(--text-light);
        font-size: 0.875rem;
    }

    .log-image {
        margin: 10px 0;
    }

    .log-image img {
        max-width: 100px;
        height: auto;
        border-radius: 8px;
        cursor: pointer;
        transition: transform 0.3s ease;
        border: 2px solid var(--border);
    }

    .log-image img:hover {
        transform: scale(1.1);
    }

    .log-image {
        margin: 1rem 0;
        display: inline-block;
        border-radius: 8px;
        overflow: hidden;
        border: 2px solid var(--border);
        transition: all 0.3s ease;
    }

    .log-image:hover {
        border-color: var(--primary);
        transform: scale(1.05);
    }

    .log-image img {
        display: block;
        max-width: 100px;
        height: auto;
    }

    /* Log Image Styles */
    .log-image-wrapper {
        margin-top: 1.5rem;
        padding: 1.25rem;
        background: var(--bg);
        border-radius: 12px;
    }

    .log-image-header {
        margin-bottom: 1rem;
    }

    .log-image-header span {
        font-size: 0.875rem;
        color: var(--text-light);
        font-weight: 500;
    }

    .log-image-actions {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .log-image-container {
        width: 120px;
        height: 120px;
        border-radius: 12px;
        overflow: hidden;
        border: 2px solid var(--border);
        background: white;
    }

    .log-image-container img.thumbnail {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
    }

    .image-preview-btn {
        background: white;
        border: 1px solid var(--border);
        width: 40px;
        height: 40px;
        border-radius: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;
        color: var(--text);
    }

    .image-preview-btn:hover {
        background: var(--primary);
        border-color: var(--primary);
        color: white;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    }

    /* Modal Styles */
    .modal {
        display: none;
        position: fixed;
        z-index: 9999;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.85);
        backdrop-filter: blur(8px);
    }

    .modal-content {
        position: relative;
        margin: auto;
        padding: 20px;
        width: 90%;
        max-width: 800px;
        top: 50%;
        transform: translateY(-50%);
    }

    .modal-content img {
        display: block;
        max-width: 100%;
        max-height: 80vh;
        margin: 0 auto;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    .modal-close {
        position: absolute;
        top: -40px;
        right: 0;
        color: white;
        font-size: 30px;
        font-weight: bold;
        cursor: pointer;
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
    }

    .modal-close:hover {
        background: var(--error);
        transform: scale(1.1);
    }

    /* Mobile Responsive */
    @media (max-width: 640px) {
        .log-image-actions {
            flex-direction: column;
            align-items: flex-start;
        }

        .log-image-container {
            width: 100%;
            height: 200px;
        }

        .image-preview-btn {
            margin-top: 0.5rem;
        }
    }

    /* New Logs Grid Layout */
    .logs-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
        padding: 1rem 0;
    }

    .log-card {
        background: white;
        border-radius: 16px;
        border: 1px solid var(--border);
        overflow: hidden;
        transition: all 0.3s ease;
        position: relative;
        margin-bottom: 1.5rem;
    }

    .log-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--hover-shadow);
    }

    .log-card-image {
        position: relative;
        width: 100%;
        height: 200px;
        background: var(--bg);
        overflow: hidden;
        cursor: pointer;
        margin-bottom: 1rem;
        border-radius: 8px;
    }

    .log-card-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        transition: transform 0.3s ease;
    }

    .log-card:hover .log-card-image img {
        transform: scale(1.05);
    }

    .log-card-content {
        padding: 1.5rem;
    }

    .log-card-info {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .log-card-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .log-user-info {
        flex: 1;
    }

    .log-user-info h3 {
        margin: 0;
        font-size: 1.125rem;
        font-weight: 600;
        color: var(--text);
    }

    .log-meta {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 1rem;
        margin-top: 0.5rem;
        font-size: 0.875rem;
        color: var(--text-light);
    }

    .log-date, .log-status {
        display: flex;
        align-items: center;
        gap: 0.375rem;
    }

    .log-status {
        padding: 0.25rem 0.75rem;
        border-radius: 6px;
        font-weight: 500;
    }

    .log-status.success {
        background: #ECFDF5;
        color: var(--success);
    }

    .log-status.failed {
        background: #FEF2F2;
        color: var(--error);
    }

    .log-imei {
        font-family: monospace;
        padding: 0.75rem;
        background: var(--bg);
        border-radius: 8px;
        font-size: 0.875rem;
        margin: 0.5rem 0;
        direction: ltr;
        text-align: center;
    }

    .log-card .log-delete-btn {
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
        padding: 0.5rem;
        border-radius: 8px;
        background: rgba(255,255,255,0.9);
        border: 1px solid var(--border);
        color: var(--text-light);
        cursor: pointer;
        transition: all 0.2s ease;
        z-index: 10;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .log-card .log-delete-btn:hover {
        background: #FEE2E2;
        color: var(--error);
        border-color: var(--error);
    }

    .log-image-modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.9);
        display: none;
        align-items: center;
        justify-content: center;
        z-index: 9999;
        padding: 2rem;
    }

    .log-image-modal.active {
        display: flex;
    }

    .log-image-modal img {
        max-width: 90%;
        max-height: 90vh;
        object-fit: contain;
        border-radius: 8px;
    }

    .log-image-modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.9);
        display: none;
        align-items: center;
        justify-content: center;
        z-index: 9999;
    }

    .log-image-modal.active {
        display: flex;
    }

    .log-image-modal img {
        max-width: 90%;
        max-height: 90vh;
        object-fit: contain;
        border-radius: 8px;
    }

    .log-image-modal .close-modal {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: white;
        border: none;
        padding: 0.5rem;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .log-image-modal .close-modal:hover {
        background: var(--error);
        color: white;
        transform: scale(1.1);
    }

    .log-card {
        background: white;
        border-radius: 16px;
        border: 1px solid var(--border);
        padding: 1.5rem;
        margin-bottom: 1rem;
        position: relative;
        transition: all 0.3s ease;
    }

    .log-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--hover-shadow);
    }

    .log-card-content {
        position: relative;
    }

    .log-card-header {
        margin-bottom: 1rem;
    }

    .log-user-info h3 {
        margin: 0 0 0.5rem 0;
        font-size: 1.125rem;
        color: var(--text);
        font-weight: 600;
    }

    .log-meta {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .log-date {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        color: var(--text-light);
        font-size: 0.875rem;
    }

    .log-status {
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        padding: 0.25rem 0.75rem;
        border-radius: 8px;
        font-size: 0.875rem;
        font-weight: 500;
    }

    .log-status.success {
        background: #ECFDF5;
        color: var(--success);
    }

    .log-status.failed {
        background: #FEF2F2;
        color: var(--error);
    }

    .log-imei {
        background: var(--bg);
        padding: 0.75rem;
        border-radius: 8px;
        font-family: monospace;
        font-size: 0.875rem;
        margin-bottom: 1rem;
        direction: ltr;
    }

    .log-view-image {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: 8px;
        color: var(--text);
        font-size: 0.875rem;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .log-view-image:hover {
        background: var(--primary);
        border-color: var(--primary);
        color: white;
        transform: translateY(-1px);
    }

    .log-view-image svg {
        width: 16px;
        height: 16px;
        stroke: currentColor;
    }

    .log-delete-btn {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: white;
        border: 1px solid var(--border);
        border-radius: 8px;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-light);
        cursor: pointer;
        transition: all 0.2s ease;
        z-index: 2;
    }

    .log-delete-btn:hover {
        background: #FEF2F2;
        border-color: #FECACA;
        color: var(--error);
    }

    .log-image-modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.9);
        display: none;
        align-items: center;
        justify-content: center;
        z-index: 9999;
        padding: 2rem;
    }

    .log-image-modal.active {
        display: flex;
    }

    .log-image-modal img {
        max-width: 90%;
        max-height: 90vh;
        object-fit: contain;
        border-radius: 8px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    .close-modal {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: white;
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 20px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
    }

    .close-modal:hover {
        background: var(--error);
        color: white;
        transform: scale(1.1);
    }

    /* Responsive adjustments */
    @media (max-width: 768px) {
        .log-card {
            padding: 1rem;
        }
        
        .log-meta {
            flex-direction: column;
            align-items: flex-start;
            gap: 0.5rem;
        }
        
        .log-view-image {
            width: 100%;
            justify-content: center;
        }
    }

    .image-modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.9);
        display: none;
        align-items: center;
        justify-content: center;
        z-index: 9999;
        padding: 2rem;
        backdrop-filter: blur(8px);
    }

    .image-modal.active {
        display: flex;
    }

    .image-modal img {
        max-width: 90%;
        max-height: 90vh;
        object-fit: contain;
        border-radius: 8px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    .image-modal .close-modal {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: white;
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 20px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .image-modal .close-modal:hover {
        background: var(--error);
        color: white;
        transform: scale(1.1);
    }

    .view-image-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: 8px;
        color: var(--text);
        font-size: 0.875rem;
        cursor: pointer;
        transition: all 0.2s;
        width: auto;
        margin-top: 1rem;
    }

    .view-image-btn svg {
        width: 16px;
        height: 16px;
        stroke: currentColor;
    }

    .view-image-btn:hover {
        background: var(--primary);
        border-color: var(--primary);
        color: white;
    }

    /* اضافه کردن حالت disabled */
    .view-image-btn[disabled] {
        opacity: 0.6;
        cursor: not-allowed;
        background: var(--border);
    }

    .view-image-btn[disabled]:hover {
        background: var(--border);
        border-color: var(--border);
        color: var(--text);
        transform: none;
    }

    .image-modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.9);
        display: none;
        align-items: center;
        justify-content: center;
        z-index: 9999;
        padding: 2rem;
        backdrop-filter: blur(8px);
    }

    .image-modal.active {
        display: flex;
    }

    .image-modal img {
        max-width: 90%;
        max-height: 90vh;
        object-fit: contain;
        border-radius: 8px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    .logs-wrapper {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }

    .report-item {
        background: white;
        border-radius: 12px;
        border: 1px solid var(--border);
        overflow: hidden;
        transition: all 0.2s ease;
    }

    .report-item:hover {
        border-color: var(--primary);
        transform: translateY(-2px);
        box-shadow: var(--shadow);
    }

    .report-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid var(--border);
        background: var(--bg);
    }

    .user-info {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }

    .user-info h3 {
        margin: 0;
        font-size: 1rem;
        font-weight: 600;
        color: var(--text);
    }

    .user-info .phone {
        font-size: 0.875rem;
        color: var(--text-light);
    }

    .status-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.375rem;
        padding: 0.375rem 0.75rem;
        border-radius: 6px;
        font-size: 0.813rem;
        font-weight: 500;
    }

    .status-badge.success {
        background: #ECFDF5;
        color: var(--success);
    }

    .status-badge.failed {
        background: #FEF2F2;
        color: var(--error);
    }

    .delete-report {
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: white;
        color: var(--text-light);
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .delete-report:hover {
        background: #FEF2F2;
        border-color: var(--error);
        color: var(--error);
    }

    .report-body {
        padding: 1.25rem 1.5rem;
    }

    .report-info {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .info-row {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .info-row .label {
        color: var(--text-light);
        font-size: 0.875rem;
        min-width: 70px;
    }

    .info-row .value {
        color: var(--text);
        font-size: 0.938rem;
    }

    .info-row .date {
        display: inline-flex;
        align-items: center;
        gap: 0.375rem;
        color: var(--text-light);
    }

    .view-image-btn {
        margin-top: 1rem;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: 8px;
        color: var(--text);
        font-size: 0.875rem;
        cursor: pointer;
        transition: all 0.2s;
    }

    .view-image-btn:hover {
        background: var(--primary);
        border-color: var(--primary);
        color: white;
    }

    .no-reports {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 3rem 1rem;
        color: var(--text-light);
    }

    .no-reports svg {
        opacity: 0.5;
    }

    .no-reports p {
        font-size: 0.938rem;
    }

    /* Responsive */
    @media (max-width: 640px) {
        .report-header {
            padding: 1rem;
            flex-wrap: wrap;
            gap: 0.75rem;
        }
        
        .report-body {
            padding: 1rem;
        }
        
        .info-row {
            flex-direction: column;
            gap: 0.25rem;
            align-items: flex-start;
        }
        
        .view-image-btn {
            width: 100%;
            justify-content: center;
        }
    }

    .validation-status {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
    }

    .validation-status svg {
        width: 16px;
        height: 16px;
    }

    .validation-status.valid {
        color: var(--success);
    }

    .validation-status.invalid {
        color: var(--error);
    }

    .imei-input-wrapper {
        position: relative;
    }

    .sms-log-entry {
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        display: flex;
        align-items: flex-start;
        gap: 1rem;
    }

    .sms-log-entry:last-child {
        border-bottom: none;
    }

    .sms-log-content {
        flex: 1;
    }

    .sms-log-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.5rem;
    }

    .sms-log-time {
        color: var(--text-light);
        font-size: 0.875rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .sms-log-status {
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        padding: 0.25rem 0.5rem;
        border-radius: 0.25rem;
        font-size: 0.875rem;
    }

    .sms-log-status.success {
        background-color: #ECFDF5;
        color: var(--success);
    }

    .sms-log-status.error {
        background-color: #FEF2F2;
        color: var(--error);
    }

    .sms-log-details {
        margin-top: 0.5rem;
        font-size: 0.875rem;
        color: var(--text-light);
    }

    .sms-log-message {
        margin-top: 0.5rem;
        padding: 0.5rem;
        background: var(--bg);
        border-radius: 0.5rem;
        font-size: 0.875rem;
    }

    /* SMS Logs Pagination Horizontal Layout */
    .sms-logs-pagination {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 1.5rem;
        flex-wrap: wrap;
    }

    /* CSV Export Button */
    .imei-button.secondary[id^="make-"] {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
        background: white;
        border: 1px solid var(--border);
        color: var(--text);
        box-shadow: 0 1px 2px rgba(0,0,0,0.05);
        text-decoration: none;
        width: auto;
        min-width: auto;
    }

    .imei-button.secondary[id^="make-"]:hover {
        background: var(--bg);
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .imei-button.secondary[id^="make-"] svg {
        width: 14px;
        height: 14px;
    }
}

/* Nova Plugin Styles */
.nova-plugin *,
.nova-plugin *::before,
.nova-plugin *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: inherit;
}

.nova-plugin {
    --nova-primary-color: #2271b1;
    --nova-error-color: #dc3232;
    --nova-success-color: #46b450;
    --nova-border-color: #dcdcde;
    --nova-text-color: #2c3338;
    --nova-bg-color: #ffffff;
    
    width: 100%;
    max-width: 100%;
    font-size: 14px;
    line-height: 1.4;
    color: var(--nova-text-color);
    background: var(--nova-bg-color);
    direction: rtl;
}

.nova-plugin .imei-form {
    all: unset;
    display: block;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.nova-plugin .imei-input-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.nova-plugin input[type="text"],
.nova-plugin input[type="number"],
.nova-plugin select,
.nova-plugin input[type="file"] {
    all: unset;
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--nova-border-color);
    border-radius: 4px;
    background: var(--nova-bg-color);
}

.nova-plugin .imei-button {
    all: unset;
    display: inline-block;
    padding: 8px 16px;
    background: var(--nova-primary-color);
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

.nova-plugin .imei-message {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
}

.nova-plugin .imei-message.error {
    background: var(--nova-error-color);
    color: white;
}

.nova-plugin .imei-message.success {
    background: var(--nova-success-color);
    color: white;
}

.nova-plugin table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1em 0;
}

.nova-plugin th,
.nova-plugin td {
    padding: 8px;
    border: 1px solid var(--nova-border-color);
}

.nova-plugin .rtl {
    direction: rtl;
}

.nova-plugin .ltr {
    direction: ltr;
}

/* Only these global styles should remain outside */
@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
