@font-face {
    font-family: "Gotham Medium";
    src: url(../fonts/Gotham-Medium.otf);
    font-style: normal;
}

@font-face {
    font-family: "Gotham Bold";
    src: url(../fonts/Gotham-Bold.otf);
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow-x: hidden;
}

.background {
    min-height: 100vh;
    background-color: #f3f4f6;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    position: relative;
}

.background::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 500px;
    height: 100vh;
    background-image: url('../images/bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 20px;
    z-index: 0;
}

.container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.logo-container {
    margin: 20px 0;
}

.logo {
    border-radius: 10px;
    text-align: center;
}

.logo-image {
    width: 146px;
    height: 88px;
}

.content-box {
    background: url(../images/form-bg.png) no-repeat;
    background-position: center center;
    background-size: 100% 100%;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    margin-bottom: 2rem;
    margin-top: 2rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    width: 100%;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #d1d5db;
    color: #265499;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fff;
    font-family: "Gotham Medium", sans-serif;
}

select.form-input {
    appearance: none;
    background-image: url('../images/Polygon\ 4.png');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px;
    padding-right: 45px;
    color: #265499;
    cursor: pointer;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
    /* Important to remove any default margin added by the spin buttons */
}

.form-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
    color: #265499;
}

/* Autocomplete Styles */
.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    margin-top: 4px;
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    color: #374151;
    transition: background-color 0.15s ease;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background-color: #f3f4f6;
}

.form-group {
    position: relative;
}

.autocomplete-suggestions::-webkit-scrollbar {
    width: 6px;
}

.autocomplete-suggestions::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 8px;
}

.autocomplete-suggestions::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 8px;
}

.autocomplete-suggestions::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.submit-btn {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    margin-top: 10px;
    font-family: "Gotham Bold", sans-serif;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn-changes {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: not-allowed;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    margin-top: 10px;
    font-family: "Gotham Bold", sans-serif;
}

.submit-btn-changes.enabled {
    background-color: #3b82f6;
    cursor: pointer;
}

.submit-btn-changes.enabled:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.submit-btn-changes.enabled:active {
    transform: translateY(0);
}

.submit-btn-changes:disabled {
    opacity: 0.6;
}

.farmer-dnt {
    display: flex;
    gap: 10px;
}

/* Tabs */
.tabs {
    background-color: #FFFFFF;
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-radius: 8px;
    padding: 3px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
}

.tab-btn {
    flex: 1;
    padding: 14px;
    background: #f9fafb;
    border: none;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #265499;
    font-family: "Gotham Bold", sans-serif;
}

.tab-btn.active {
    background: #2563eb;
    color: #fff;
}

.tab-btn:hover:not(.active) {
    background: #e5e7eb;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Farmer List */
.farmer-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.farmer-item {
    font-family: "Gotham Medium", sans-serif;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.farmer-item:hover {
    border-color: #2563eb;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.farmer-id {
    color: #265499;
}

.farmer-name {
    font-family: "Gotham Medium", sans-serif;
    font-size: 15px;
    /* font-weight: 600; */
    color: #265499;
}

.edit-icon {
    width: 40px;
    height: 28px;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* SKU Items */
.sku-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.sku-count {
    color: #265499;
    font-family: "Gotham Medium", sans-serif;
}

.sku-name {
    font-family: "Gotham Medium", sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #265499;
}

.sku-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.approve-btn {
    /* background: #10b981; */
    background: #FFFFFF;
    border: 1px solid #D2D2D2;
    color: #fff;
}

.approve-btn:hover {
    /* background: #059669; */
    background: #FFFFFF;
    border: 1px solid #D2D2D2;
    transform: scale(1.1);
}

.reject-btn {
    /* background: #ef4444; */
    background: #FFFFFF;
    border: 1px solid #D2D2D2;
    color: #fff;
}

.reject-btn:hover {
    /* background: #dc2626; */
    background: #FFFFFF;
    border: 1px solid #D2D2D2;
    transform: scale(1.1);
}

/* Action button active states */
.action-btn.active {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.approve-btn.active {
    background-color: #000000;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
}

.reject-btn.active {
    background-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
}

/* SKU item selection states */
.sku-item.approved-selected {
    background-color: rgba(16, 185, 129, 0.05);
    border-left: 3px solid #10b981;
    padding-left: 13px;
}

.sku-item.rejected-selected {
    background-color: rgba(239, 68, 68, 0.05);
    border-left: 3px solid #ef4444;
    padding-left: 13px;
}

.status-badge {
    font-family: "Gotham Medium", sans-serif;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-approved {
    font-family: "Gotham Medium", sans-serif;
    background: #d1fae5;
    color: #065f46;
}

.status-rejected {
    font-family: "Gotham Medium", sans-serif;
    background: #fee2e2;
    color: #991b1b;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #e5e7eb;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
}

.modal-header h3 {
    font-family: "Gotham Bold", sans-serif;
    color: #265499;
    font-size: 18px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #6b7280;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.sku-list {
    padding: 20px;
}

/* pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 20px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 8px 12px;
    min-width: 40px;
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(.disabled) {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.pagination-btn.active {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.pagination-btn.active:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

.pagination-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: #f9fafb;
}

.pagination-ellipsis {
    padding: 8px 4px;
    color: #6b7280;
    font-weight: 500;
}

/* Completion date styling */
.completion-date {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
    font-style: italic;
}

/* Responsive Design */

@media (max-width: 640px) {
    .pagination {
        gap: 4px;
        padding: 15px 10px;
    }

    .pagination-btn {
        padding: 6px 10px;
        min-width: 36px;
        font-size: 13px;
    }
}

@media (max-width: 550px) {
    .container {
        max-width: 100%;
    }

    .content-box {
        padding: 20px;
    }

    .form-input {
        padding: 12px 14px;
        font-size: 14px;
    }

    .submit-btn {
        padding: 13px;
        font-size: 15px;
    }

    .edit-icon {
        font-size: 15px;
        width: 30px;
        height: 26px;
    }

    .farmer-dnt {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 380px) {
    .background {
        padding: 15px;
    }

    .farmer-item {
        padding: 14px;
    }

    .farmer-name {
        font-size: 14px;
    }

    .edit-icon {
        font-size: 14px;
        width: 25px;
        height: 22px;
    }
}

@media (max-width: 360px) {
    .status-badge {
        font-size: 10px;
        gap: 10px;
        padding: 5px 10px;
    }
}

/* Desktop Access Message */
.desktop-message {
    display: none; /* Hidden by default, shown on desktop */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f3f4f6;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    z-index: 9998; /* Below global loader */
    flex-direction: column;
    color: #374151;
    font-size: 18px;
    line-height: 1.6;
}

.desktop-message h2 {
    font-family: "Gotham Bold", sans-serif;
    color: #265499;
    margin-bottom: 15px;
}

.desktop-message p {
    font-family: "Gotham Medium", sans-serif;
    max-width: 400px;
}

@media (min-width: 1025px) { 
    .background .container { display: none; } 
    .desktop-message { display: flex; } 
}


/* Global Loader */
#globalLoader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    display: none; /* Hidden by default */
}

#globalLoader .loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #2563eb;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

