:root {
    --primary-color: #0D63AC;
    --primary-hover: #0A5BCB;
    --secondary-color: #2b7c39;
    --secondary-hover: #1e6a2d;
    --text-color: #333;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --border-color: #ddd;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --transition: all 0.3s ease;
}

.delivery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
}

.header h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 500;
}

.header p {
    color: #666;
    font-size: 1.1rem;
}

.top-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.top-button {
    background-color: #2c3e50;
    color: white;
    border: none;
    padding: 15px;
    font-size: 1.1rem;
    cursor: pointer;
    text-align: center;
    border-radius: var(--radius);
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

.top-button.secondary {
    background-color: var(--secondary-color);
}

.top-button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.top-button.secondary:hover {
    background-color: var(--secondary-hover);
}

.top-button i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.section-title {
    text-align: center;
    font-size: 1.8rem;
    margin: 0 0 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    color: #2c3e50;
    font-weight: 500;
}

.table-section {
    margin-bottom: 30px;
}

.toggle-table {
    background-color: #a3a3a3;
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 1.1rem;
    cursor: pointer;
    width: 100%;
    text-align: left;
    margin-bottom: 5px;
    border-radius: var(--radius);
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.toggle-table:hover {
    background-color: var(--primary-hover);
}

.toggle-table i {
    transition: transform 0.3s;
}

.toggle-table.collapsed i {
    transform: rotate(-90deg);
}

.table-container {
    overflow-x: auto;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    display: none;
    border-radius: var(--radius);
    background: white;
    border: 1px solid var(--border-color);
}

.table-container.active {
    display: block;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.data-table thead tr {
    background-color: var(--primary-color);
    color: white;
}

.data-table th, .data-table td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid var(--border-color);
}

.data-table tbody tr:nth-child(even) {
    background-color: var(--light-gray);
}

.data-table tbody tr:hover {
    background-color: var(--medium-gray);
}

.data-table td.empty {
    color: #7f8c8d;
    font-style: normal;
}

.company-card {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.company-card th, .company-card td {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.company-card th {
    background-color: var(--primary-color);
    color: white;
    width: 30%;
}

.company-card td {
    background-color: white;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    padding: 15px;
    background: var(--light-gray);
    border-radius: var(--radius);
}

.action-btn {
    background: white;
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: var(--radius);
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.action-btn:hover {
    background-color: var(--medium-gray);
    transform: translateY(-2px);
}

.action-btn i {
    font-size: 1rem;
}

.email-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

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

.email-modal-content {
    background: white;
    padding: 25px;
    border-radius: var(--radius);
    width: 90%;
    max-width: 450px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.email-modal h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.email-input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
}

.email-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 99, 172, 0.2);
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.modal-btn.cancel {
    background-color: var(--light-gray);
    color: var(--text-color);
}

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

.modal-btn.send {
    background-color: var(--primary-color);
    color: white;
}

.modal-btn.send:hover {
    background-color: var(--primary-hover);
}

.status-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: var(--radius);
    display: none;
    font-size: 0.95rem;
}

.status-message.success {
    background-color: #d4edda;
    color: #155724;
    display: block;
}

.status-message.error {
    background-color: #f8d7da;
    color: #721c24;
    display: block;
}

/* Мобильные стили */
@media (max-width: 768px) {
    .delivery-container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 1.6rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .top-buttons {
        grid-template-columns: 1fr;
    }
    
    .top-button {
        padding: 12px;
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .toggle-table {
        padding: 12px 15px;
        font-size: 1rem;
    }
    
    .data-table th, 
    .data-table td,
    .company-card th,
    .company-card td {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .data-table {
        font-size: 0.85rem;
    }
    
    .company-card th,
    .company-card td {
        display: block;
        width: 100%;
    }
    
    .company-card th {
        border-bottom: none;
    }
    
    .company-card td {
        border-top: none;
    }
    
    .email-modal-content {
        padding: 20px 15px;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .modal-btn {
        width: 100%;
    }
}