/* Reset e configurações globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Cores dos Correios */
:root {
    --correios-blue: #003d82;
    --correios-yellow: #ffcc00;
    --correios-light-blue: #0066cc;
    --correios-dark-blue: #002a5c;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #6c757d;
    --dark-gray: #343a40;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--correios-blue) 0%, var(--correios-dark-blue) 100%);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 61, 130, 0.3);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    position: relative;
    width: 40px;
    height: 30px;
}

.arrow-yellow,
.arrow-blue {
    position: absolute;
    width: 0;
    height: 0;
}

.arrow-yellow {
    border-left: 20px solid var(--correios-yellow);
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    left: 0;
    z-index: 2;
}

.arrow-blue {
    border-left: 20px solid var(--correios-light-blue);
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    left: 15px;
    z-index: 1;
}

.logo-text {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    text-transform: lowercase;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Main Content */
.main {
    flex: 1;
}

.hero-section {
    background: linear-gradient(135deg, var(--correios-yellow) 0%, #ffdd44 100%);
    padding: 4rem 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--correios-blue);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-section p {
    font-size: 1.2rem;
    color: var(--correios-dark-blue);
    margin-bottom: 3rem;
    font-weight: 400;
}

.tracking-form {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 61, 130, 0.15);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group label {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--correios-blue);
    text-align: left;
}

.form-group input {
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.form-group input:focus {
    outline: none;
    border-color: var(--correios-light-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-group button {
    background: linear-gradient(135deg, var(--correios-blue) 0%, var(--correios-light-blue) 100%);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 61, 130, 0.3);
}

.form-group button:active {
    transform: translateY(0);
}

.tracking-form small {
    color: var(--medium-gray);
    font-size: 0.9rem;
    margin-top: 1rem;
    display: block;
}

/* Info Section */
.info-section {
    padding: 4rem 0;
    background: var(--white);
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 61, 130, 0.1);
    border-color: var(--correios-yellow);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.card h3 {
    color: var(--correios-blue);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.card p {
    color: var(--medium-gray);
    line-height: 1.6;
}

/* Tracking Results */
.tracking-results {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
}

.tracking-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--light-gray);
    border-radius: 8px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-item label {
    font-weight: 600;
    color: var(--correios-blue);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.info-item span {
    color: var(--dark-gray);
    font-size: 1rem;
}

.status-timeline {
    margin-top: 2rem;
}

.status-timeline h3 {
    color: var(--correios-blue);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.timeline-item {
    display: flex;
    padding: 1rem;
    border-left: 3px solid var(--correios-yellow);
    margin-bottom: 1rem;
    background: var(--light-gray);
    border-radius: 0 8px 8px 0;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 1.5rem;
    width: 12px;
    height: 12px;
    background: var(--correios-blue);
    border-radius: 50%;
    border: 3px solid var(--white);
}

.timeline-item:first-child::before {
    background: var(--correios-yellow);
}

.timeline-content {
    flex: 1;
}

.timeline-date {
    color: var(--medium-gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.timeline-status {
    font-weight: 600;
    color: var(--correios-blue);
    margin-bottom: 0.5rem;
}

.timeline-location {
    font-size: 0.9rem;
    color: var(--medium-gray);
    margin-bottom: 0.5rem;
}

.timeline-description {
    color: var(--dark-gray);
    line-height: 1.5;
}

/* Footer */
.footer {
    background: var(--correios-dark-blue);
    color: var(--white);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-logo .logo-text {
    font-size: 1.5rem;
}

.footer-info {
    text-align: right;
}

.footer-info p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Error and Success Messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Admin Styles */
.admin-header {
    background: linear-gradient(135deg, var(--correios-dark-blue) 0%, var(--correios-blue) 100%);
}

.admin-nav {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
}

.admin-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-nav .nav-links {
    display: flex;
    gap: 1.5rem;
}

.admin-nav .nav-links a {
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.3s;
}

.admin-nav .nav-links a:hover,
.admin-nav .nav-links a.active {
    background: rgba(255, 255, 255, 0.2);
}

.logout-btn {
    background: var(--correios-yellow);
    color: var(--correios-blue) !important;
    font-weight: 600;
}

.logout-btn:hover {
    background: #ffdd44 !important;
}

/* Login Form */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--correios-blue) 0%, var(--correios-dark-blue) 100%);
}

.login-form {
    background: var(--white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-form h2 {
    text-align: center;
    color: var(--correios-blue);
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.form-field {
    margin-bottom: 1.5rem;
}

.form-field label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--correios-blue);
    font-weight: 500;
}

.form-field input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-field input:focus {
    outline: none;
    border-color: var(--correios-light-blue);
}

.btn-login {
    width: 100%;
    background: linear-gradient(135deg, var(--correios-blue) 0%, var(--correios-light-blue) 100%);
    color: var(--white);
    border: none;
    padding: 1rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s;
}

.btn-login:hover {
    transform: translateY(-1px);
}

/* Tables */
.table-container {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.table th {
    background: var(--correios-blue);
    color: var(--white);
    font-weight: 600;
}

.table tr:hover {
    background: var(--light-gray);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--correios-blue);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--correios-dark-blue);
}

.btn-success {
    background: #28a745;
    color: var(--white);
}

.btn-success:hover {
    background: #218838;
}

.btn-warning {
    background: var(--correios-yellow);
    color: var(--correios-blue);
}

.btn-warning:hover {
    background: #ffdd44;
}

.btn-danger {
    background: #dc3545;
    color: var(--white);
}

.btn-danger:hover {
    background: #c82333;
}

.btn-small {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .tracking-form {
        margin: 0 1rem;
        padding: 1.5rem;
    }
    
    .form-group {
        gap: 0.8rem;
    }
    
    .form-group input,
    .form-group button {
        padding: 0.8rem;
        font-size: 1rem;
    }
    
    .info-cards {
        grid-template-columns: 1fr;
    }
    
    .tracking-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-info {
        text-align: center;
    }
    
    .admin-nav .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .table {
        min-width: 600px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .tracking-form {
        padding: 1rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .login-form {
        margin: 1rem;
        padding: 2rem;
    }
}