* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    direction: rtl;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.app-header {
    background: linear-gradient(135deg, #2c5f2d 0%, #3a7f3e 50%, #4a9f4f 100%);
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1400px;
    margin: 0 auto;
}

/* User section styles removed - not needed */

.app-title {
    color: white;
    font-size: 32px;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 1px;
}

.settings-btn {
    background: white;
    color: #2c5f2d;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.settings-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    background: #f1f8f4;
}

/* Date Bar */
.date-bar {
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    padding: 12px 20px;
    text-align: center;
    color: white;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.calendar-icon {
    font-size: 20px;
}

/* Quick Navigation Menu */
.quick-nav {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 60px;
    z-index: 90;
    border-bottom: 3px solid #10b981;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.nav-container::-webkit-scrollbar {
    display: none;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 15px 20px;
    text-decoration: none;
    color: #374151;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    min-width: 100px;
    border-right: 1px solid #e5e7eb;
}

.nav-item:first-child {
    border-right: none;
}

.nav-item:hover {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-bottom-color: #10b981;
    transform: translateY(-2px);
}

.nav-icon {
    font-size: 28px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.nav-label {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.nav-item.active {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    border-bottom-color: #10b981;
    color: #166534;
    font-weight: bold;
}

/* Back Button */
.back-btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.back-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* App Download Banner */
.app-banner {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 16px 20px;
    margin: 20px auto;
    max-width: 1360px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    position: relative;
    animation: slideDown 0.5s ease-out;
}

.app-banner.hidden {
    display: none;
}

.close-banner {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.close-banner:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.banner-icon {
    font-size: 48px;
    animation: bounce 2s infinite;
}

.banner-text {
    flex: 1;
}

.banner-text h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: bold;
}

.app-stats {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 8px 0;
    flex-wrap: wrap;
}

.rating {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rating-number {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
}

.stars {
    font-size: 14px;
    line-height: 1;
}

.downloads {
    font-size: 14px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.app-features {
    margin: 8px 0 0 0;
    font-size: 13px;
    opacity: 0.95;
    font-weight: 500;
}

.download-btn {
    text-decoration: none;
    transition: transform 0.3s;
}

.download-btn:hover {
    transform: scale(1.05);
}

.download-btn img {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    flex: 1;
}

.sections-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.content-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.content-section.half-width {
    margin-bottom: 0;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 3px solid #e5e7eb;
}

.section-icon {
    font-size: 36px;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.prices-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.prices-table thead {
    background: linear-gradient(135deg, #374151, #4b5563);
}

.prices-table th {
    padding: 18px;
    text-align: right;
    color: white;
    font-weight: 700;
    font-size: 16px;
    border-bottom: 2px solid #6b7280;
}

.prices-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.3s;
}

.prices-table tbody tr:hover {
    background: #f9fafb;
}

.prices-table tbody tr:last-child {
    border-bottom: none;
}

.prices-table td {
    padding: 16px 18px;
}

.item-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.item-icon {
    font-size: 28px;
}

.item-name {
    font-size: 18px;
}

.price-cell {
    text-align: center;
}

.price-badge {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 20px;
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.price-badge.orange {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.price-badge.blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.price-badge.brown {
    background: linear-gradient(135deg, #92400e, #78350f);
}

.price-badge.teal {
    background: linear-gradient(135deg, #14b8a6, #0d9488);
}

.price-badge.green {
    background: linear-gradient(135deg, #10b981, #059669);
}

.unit-text {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

/* Poultry Table Specific */
.poultry-table th:first-child,
.poultry-table td:first-child {
    border-right: 3px solid #e5e7eb;
}

/* Companies Grid */
.companies-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.company-card {
    background: white;
    border-radius: 16px;
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.company-card.green {
    border-color: #4ade80;
    background: linear-gradient(to bottom, #ffffff, #f0fdf4);
}

.company-card.blue {
    border-color: #60a5fa;
    background: linear-gradient(to bottom, #ffffff, #eff6ff);
}

.company-card.orange {
    border-color: #fb923c;
    background: linear-gradient(to bottom, #ffffff, #fff7ed);
}

.company-card.teal {
    border-color: #2dd4bf;
    background: linear-gradient(to bottom, #ffffff, #f0fdfa);
}

.company-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.company-icon {
    font-size: 45px;
    margin-bottom: 12px;
}

.company-name {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.company-desc {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 15px;
}

.view-btn {
    background: linear-gradient(135deg, #2c5f2d, #3a7f3e);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.view-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 550px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, #2c5f2d, #3a7f3e);
    color: white;
    padding: 20px 30px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 24px;
}

.close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.close-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

.setting-item {
    margin-bottom: 20px;
}

.setting-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #374151;
    font-size: 15px;
}

.setting-item input {
    width: 100%;
    padding: 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
    background: #f9fafb;
}

.setting-item input:focus {
    outline: none;
    border-color: #2c5f2d;
    background: white;
    box-shadow: 0 0 0 3px rgba(44, 95, 45, 0.1);
}

.save-btn {
    width: 100%;
    background: linear-gradient(135deg, #2c5f2d, #3a7f3e);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 95, 45, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        padding: 0 15px;
        margin: 30px auto;
    }
    
    .app-title {
        font-size: 26px;
    }
    
    .sections-row {
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .content-section {
        padding: 25px 20px;
    }
}

@media (max-width: 768px) {
    .app-header {
        padding: 15px 10px;
    }
    
    .header-content {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .app-title {
        font-size: 22px;
        width: 100%;
        text-align: center;
        order: 1;
    }
    
    /* user-section removed */
    
    .settings-btn {
        order: 3;
        padding: 10px 18px;
        font-size: 14px;
    }
    
    .user-avatar {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
    
    .user-name {
        font-size: 14px;
    }
    
    .date-bar {
        font-size: 14px;
        padding: 10px 15px;
    }
    
    .main-content {
        padding: 0 10px;
        margin: 20px auto;
    }
    
    /* Stack sections vertically on tablets */
    .sections-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .content-section {
        padding: 20px 15px;
        margin-bottom: 0;
    }
    
    .section-title {
        font-size: 22px;
    }
    
    .section-icon {
        font-size: 32px;
    }
    
    .prices-table th,
    .prices-table td {
        padding: 14px 12px;
        font-size: 15px;
    }
    
    .item-cell {
        font-size: 16px;
    }
    
    .item-icon {
        font-size: 24px;
    }
    
    .price-badge {
        padding: 8px 16px;
        font-size: 17px;
    }
    
    .companies-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .company-card {
        padding: 20px 15px;
    }
    
    .company-icon {
        font-size: 40px;
    }
    
    .company-name {
        font-size: 16px;
    }
    
    .company-desc {
        font-size: 12px;
    }
    
    /* Quick Nav Responsive */
    .nav-item {
        padding: 12px 15px;
        min-width: 90px;
    }
    
    .nav-icon {
        font-size: 24px;
    }
    
    .nav-label {
        font-size: 13px;
    }
    
    /* App Banner Responsive */
    .app-banner {
        margin: 12px;
        padding: 12px;
    }
    
    .banner-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .banner-icon {
        font-size: 36px;
    }
    
    .banner-text {
        text-align: center;
    }
    
    .banner-text h3 {
        font-size: 16px;
    }
    
    .app-stats {
        justify-content: center;
        gap: 12px;
    }
    
    .rating-number {
        font-size: 18px;
    }
    
    .stars {
        font-size: 13px;
    }
    
    .downloads {
        font-size: 13px;
        padding: 3px 10px;
    }
    
    .app-features {
        font-size: 12px;
    }
    
    .download-btn img {
        height: 36px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .app-header {
        padding: 12px 8px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 12px;
    }
    
    .app-title {
        font-size: 20px;
        order: 1;
    }
    
    /* user-section removed */
    
    .settings-btn {
        order: 3;
        width: 100%;
        padding: 12px;
        font-size: 15px;
    }
    
    .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }
    
    .user-name {
        font-size: 13px;
    }
    
    .date-bar {
        font-size: 13px;
        padding: 10px;
        gap: 6px;
    }
    
    .calendar-icon {
        font-size: 18px;
    }
    
    /* Quick Nav Mobile */
    .nav-item {
        padding: 10px 12px;
        min-width: 80px;
        gap: 4px;
    }
    
    .nav-icon {
        font-size: 22px;
    }
    
    .nav-label {
        font-size: 11px;
    }
    
    .main-content {
        padding: 0 8px;
        margin: 15px auto;
    }
    
    .sections-row {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 15px;
    }
    
    .content-section {
        padding: 18px 12px;
        border-radius: 12px;
    }
    
    .section-title {
        font-size: 20px;
        gap: 8px;
        padding-bottom: 12px;
    }
    
    .section-icon {
        font-size: 28px;
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -12px;
        border-radius: 0;
    }
    
    .prices-table {
        min-width: 100%;
        font-size: 13px;
    }
    
    .prices-table th {
        padding: 12px 8px;
        font-size: 14px;
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .prices-table td {
        padding: 12px 8px;
    }
    
    .item-cell {
        font-size: 15px;
        gap: 8px;
    }
    
    .item-icon {
        font-size: 22px;
    }
    
    .item-name {
        font-size: 15px;
    }
    
    .price-badge {
        padding: 6px 12px;
        font-size: 15px;
    }
    
    .unit-text {
        font-size: 10px;
    }
    
    /* Single column for companies on mobile */
    .companies-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .company-card {
        padding: 20px 15px;
    }
    
    .company-icon {
        font-size: 45px;
    }
    
    .company-name {
        font-size: 18px;
    }
    
    .company-desc {
        font-size: 12px;
    }
    
    .view-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    /* Modal adjustments */
    .modal-content {
        width: 95%;
        margin: 0 10px;
    }
    
    .modal-header {
        padding: 18px 20px;
    }
    
    .modal-header h2 {
        font-size: 20px;
    }
    
    .modal-body {
        padding: 25px 20px;
    }
    
    .setting-item input {
        padding: 12px;
        font-size: 15px;
    }
    
    .save-btn {
        padding: 15px;
        font-size: 17px;
    }
    
    /* Fix white screen on mobile */
    .main-content {
        display: block !important;
        visibility: visible !important;
        width: 100% !important;
        overflow: visible !important;
    }
    
    .sections-row {
        display: block !important;
        width: 100% !important;
    }
    
    .content-section {
        width: 100% !important;
        margin-bottom: 20px !important;
        box-sizing: border-box !important;
    }
    
    /* Footer fixes for mobile */
    footer {
        width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
    
    footer > div {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}