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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f7;
    color: #1d1d1f;
    line-height: 1.6;
}

.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.screen {
    width: 100%;
    max-width: 1200px;
}

.hidden {
    display: none !important;
}

/* Card de Autenticação */
.auth-card {
    background: #ffffff;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1d1d1f;
}

.logo p {
    color: #86868b;
    margin-bottom: 2rem;
}

/* Input Groups */
.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #d2d2d7;
    border-radius: 12px;
    font-size: 1rem;
    background: transparent;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #0071e3;
}

.input-group label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    background: white;
    padding: 0 0.5rem;
    color: #86868b;
    transition: all 0.3s ease;
    pointer-events: none;
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
    top: -0.5rem;
    font-size: 0.8rem;
    color: #0071e3;
}

/* Botões */
.btn-primary {
    width: 100%;
    padding: 1rem;
    background: #0071e3;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.btn-primary:hover {
    background: #0077ed;
    transform: translateY(-1px);
}

.btn-secondary {
    padding: 0.5rem 1rem;
    background: transparent;
    color: #0071e3;
    border: 2px solid #0071e3;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #0071e3;
    color: white;
}

.btn-icon {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #0071e3;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: #f5f5f7;
}

/* Loader */
.button-loader {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Header da App */
.header {
    background: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f5f5f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-weight: 600;
}

.badge {
    background: #ff453a;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Listas */
.items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.item-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f5f5f7;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.item-card:hover {
    transform: translateX(4px);
}

.item-info h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.item-info p {
    color: #86868b;
    font-size: 0.9rem;
}

.item-stock {
    text-align: right;
}

.stock-critical {
    color: #ff453a;
    font-weight: 600;
}

.empty-state {
    text-align: center;
    color: #86868b;
    padding: 2rem;
}

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

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .auth-card {
        padding: 2rem;
        margin: 1rem;
    }
    
    .header-content {
        padding: 0 1rem;
    }
    
    .card-header,
    .card-body {
        padding: 1rem;
    }
    
    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
}

/* Animações */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}