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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

.header {
    text-align: center;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.logo {
    max-width: 350px;
    width: auto;
    height: auto;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.header h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 10px;
}

.user-section {
    margin-top: 20px;
}

.login-form, .register-form, .user-info {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.login-form input, .register-form input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.login-form button, .register-form button, .user-info button {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.login-form button:hover, .register-form button:hover, .user-info button:hover {
    background: #5a6fd8;
}

.user-info {
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
}

#welcomeText {
    font-weight: 600;
    color: #2c3e50;
    margin-right: 15px;
}

.login-prompt {
    background: rgba(255, 255, 255, 0.95);
    padding: 60px 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin: 20px 0;
}

.login-prompt h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 300;
}

.login-prompt p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
}

.main-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.tracking-form h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 400;
}

.input-group {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

#trackingNumber {
    flex: 1;
    min-width: 250px;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

#trackingNumber:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#trackButton {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

#trackButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

#trackButton:active {
    transform: translateY(0);
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 10px;
    padding: 10px;
    background: #fdf2f2;
    border: 1px solid #fecaca;
    border-radius: 5px;
    display: none;
}

.tracking-result {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.tracking-result h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

#resultContent {
    color: #555;
    line-height: 1.6;
}

.result-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.status-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.status-icon {
    font-size: 1.5rem;
}

.status-dostavljena {
    color: #28a745;
    font-weight: 600;
}

.status-u-isporuci {
    color: #ffc107;
    font-weight: 600;
}

.status-primljena {
    color: #17a2b8;
    font-weight: 600;
}

.status-u-transportu {
    color: #6c757d;
    font-weight: 600;
}

.status-nije-u-evidenciji {
    color: #dc3545;
    font-weight: 600;
}

.status-pronađena {
    color: #27ae60;
    font-weight: 600;
}

.status-nije-pronađena {
    color: #e74c3c;
    font-weight: 600;
}

.status-greška {
    color: #e74c3c;
    font-weight: 600;
}

.status-nepoznato {
    color: #95a5a6;
    font-weight: 600;
}


.details-section {
    margin: 15px 0;
}

.details-content {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    border-left: 3px solid #667eea;
    margin-top: 8px;
    line-height: 1.6;
}


.tracking-timeline {
    margin: 20px 0;
}

.tracking-item {
    display: flex;
    flex-direction: column;
    padding: 15px;
    margin: 10px 0;
    border-radius: 8px;
    border-left: 4px solid #ddd;
    background: #f8f9fa;
    position: relative;
}

.tracking-item.delivered {
    border-left-color: #28a745;
    background: #d4edda;
}

.tracking-item.in-delivery {
    border-left-color: #ffc107;
    background: #fff3cd;
}

.tracking-item.received {
    border-left-color: #17a2b8;
    background: #d1ecf1;
}

.tracking-item.in-transit {
    border-left-color: #6c757d;
    background: #e2e3e5;
}

.tracking-status {
    font-weight: 600;
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 5px;
}

.tracking-location {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.tracking-datetime {
    font-size: 12px;
    color: #888;
    font-style: italic;
}

.tracking-item::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 20px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    border: 2px solid white;
}

.tracking-item.delivered::before {
    background: #28a745;
}

.tracking-item.in-delivery::before {
    background: #ffc107;
}

.tracking-item.received::before {
    background: #17a2b8;
}

.tracking-item.in-transit::before {
    background: #6c757d;
}

/* Accordion Styles */
.tracking-accordion {
    margin: 20px 0;
}

.accordion-item {
    margin: 10px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.accordion-item.delivered {
    border-left: 4px solid #28a745;
}

.accordion-item.in-delivery {
    border-left: 4px solid #ffc107;
}

.accordion-item.received {
    border-left: 4px solid #17a2b8;
}

.accordion-item.in-transit {
    border-left: 4px solid #6c757d;
}

.accordion-header {
    background: #f8f9fa;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid #e0e0e0;
}

.accordion-header:hover {
    background: #e9ecef;
}

.accordion-item.delivered .accordion-header {
    background: #d4edda;
}

.accordion-item.in-delivery .accordion-header {
    background: #fff3cd;
}

.accordion-item.received .accordion-header {
    background: #d1ecf1;
}

.accordion-item.in-transit .accordion-header {
    background: #e2e3e5;
}

.accordion-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.accordion-status .status-icon {
    font-size: 1.5rem;
}

.accordion-status .status-text {
    font-weight: 600;
    font-size: 16px;
    color: #2c3e50;
}

.accordion-arrow {
    font-size: 12px;
    color: #666;
    transition: transform 0.3s ease;
}

.accordion-arrow.open {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: white;
}

.accordion-content.open {
    max-height: 200px;
}

.content-details {
    padding: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.detail-label {
    font-weight: 600;
    color: #666;
    font-size: 14px;
}

.detail-value {
    color: #2c3e50;
    font-size: 14px;
    text-align: right;
}

.detail-value.status-delivered {
    color: #28a745;
    font-weight: 600;
}

.detail-value.status-in-delivery {
    color: #ffc107;
    font-weight: 600;
}

.detail-value.status-received {
    color: #17a2b8;
    font-weight: 600;
}

.detail-value.status-in-transit {
    color: #6c757d;
    font-weight: 600;
}

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

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
}

.close:hover {
    color: #000;
}

.modal h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.history-item, .favorite-item, .notification-item {
    background: #f8f9fa;
    padding: 15px;
    margin: 10px 0;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.history-item h4, .favorite-item h4, .notification-item h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.history-item p, .favorite-item p, .notification-item p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.notification-item.unread {
    background: #e3f2fd;
    border-left-color: #2196f3;
}

.notification-item.read {
    background: #f5f5f5;
    border-left-color: #ccc;
}

.action-buttons {
    margin-top: 10px;
}

.action-buttons button {
    padding: 5px 10px;
    margin-right: 5px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.action-buttons button:hover {
    background: #5a6fd8;
}

.action-buttons button.danger {
    background: #e74c3c;
}

.action-buttons button.danger:hover {
    background: #c0392b;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 20px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    #trackingNumber {
        min-width: 100%;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .logo {
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .tracking-form h2 {
        font-size: 1.4rem;
    }
}

/* Notification badge */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    min-width: 20px;
    padding: 0 2px;
}

/* Package number badge */
.package-number {
    background: #667eea;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 20px;
    display: inline-block;
}

/* Tracking table styles */
.tracking-table-container {
    margin: 20px 0;
    overflow-x: auto;
}

.tracking-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.tracking-table thead {
    background: #dc3545;
    color: white;
}

.tracking-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.tracking-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s;
}

.tracking-table tbody tr:hover {
    background-color: #f8f9fa;
}

.tracking-table tbody tr:last-child {
    border-bottom: none;
}

.tracking-table td {
    padding: 12px 15px;
    font-size: 14px;
    color: #333;
}

.tracking-table tbody tr.delivered {
    background-color: #f0f9f4;
}

.tracking-table tbody tr.in-delivery {
    background-color: #fffbf0;
}

.tracking-table tbody tr.received {
    background-color: #f0f9fc;
}

.tracking-table tbody tr.in-transit {
    background-color: #f5f5f5;
}

.tracking-table .no-data {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}
