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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #F4F6F9;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header-icon {
    font-size: 48px;
    margin-bottom: 10px;
    display: block;
}

h1 {
    font-size: 32px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 700;
}

.subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

textarea, input[type="text"], input[type="date"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    box-sizing: border-box;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

textarea {
    height: 180px;
    resize: vertical;
}

textarea:focus, input[type="text"]:focus, input[type="date"]:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1);
    background-color: white;
}

textarea:hover, input[type="text"]:hover, input[type="date"]:hover {
    border-color: #b0b0b0;
}

button {
    padding: 14px 24px;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.6);
    background: #357abd;
}

button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(74, 144, 226, 0.4);
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.tabs {
    display: flex;
    background: #f5f5f5;
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 30px;
    gap: 6px;
}

.tab {
    flex: 1;
    padding: 14px 20px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    border-radius: 10px;
    font-size: 15px;
}

.tab:hover {
    background: rgba(74, 144, 226, 0.1);
    color: #4a90e2;
}

.tab.active {
    background: #4a90e2;
    color: white;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.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);
    }
}

.results {
    margin-top: 30px;
}

.card {
    background: #fff;
    border: 2px solid #f0f0f0;
    margin-bottom: 20px;
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #e0e0e0;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #f8f9fa;
    border-bottom: 2px solid #f0f0f0;
}

.tracking-number {
    font-weight: 700;
    font-size: 18px;
    color: #333;
}

.status-badge {
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    color: white;
    min-width: 90px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.status-signed { background: #28a745; }
.status-delivering { background: #17a2b8; }
.status-transit { background: #007bff; }
.status-error { background: #dc3545; }

.card-body {
    padding: 20px 24px;
    color: #666;
    font-size: 15px;
}

.detail-list {
    margin-top: 15px;
    font-size: 14px;
    display: none;
    background: #f8f9fa;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.detail-item {
    margin-bottom: 12px;
    border-bottom: 1px dashed #e0e0e0;
    padding-bottom: 12px;
}

.detail-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.show-details {
    color: #4a90e2;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    margin-top: 12px;
    transition: all 0.3s ease;
}

.show-details:hover {
    color: #357abd;
    transform: translateX(4px);
}

.card.error .card-header {
    background: #fff5f5;
}

.card.error .status-badge {
    background: #dc3545;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.history-table th, .history-table td {
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.history-table th {
    background: #f8f9fa;
    font-weight: 700;
    color: #333;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.history-table tr {
    transition: all 0.3s ease;
}

.history-table tbody tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.01);
}

.history-table .status-cell {
    text-align: center;
}

.history-table .status-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    color: white;
    min-width: 90px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.history-table .status-signed { background: #28a745; }
.history-table .status-delivering { background: #17a2b8; }
.history-table .status-transit { background: #007bff; }

.filter-group {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-group .form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

.filter-group button {
    width: auto;
    margin-bottom: 0;
    min-width: 100px;
}

.button-group {
    display: flex;
    gap: 12px;
}

.button-group button {
    flex: 1;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.pagination-btn {
    padding: 10px 20px;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.pagination-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.5);
    background: #357abd;
}

.pagination-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.pagination-info {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.pagination-info span {
    font-weight: 700;
    color: #4a90e2;
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(40, 167, 69, 0.3);
    font-size: 15px;
    font-weight: 600;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.error {
    background: #dc3545;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 24px;
        border-radius: 16px;
    }

    h1 {
        font-size: 24px;
    }

    .header-icon {
        font-size: 36px;
    }

    .subtitle {
        font-size: 14px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    textarea, input[type="text"], input[type="date"] {
        padding: 16px;
        font-size: 16px;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group .form-group {
        min-width: 100%;
    }

    .filter-group button {
        width: 100%;
    }

    .button-group {
        flex-direction: column;
    }

    .button-group button {
        width: 100%;
    }

    .pagination {
        flex-direction: column;
    }

    .pagination-btn {
        width: 100%;
    }
}