body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    padding: 10px;
    color: #1c1e21;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    margin: 0;
    color: #1877f2;
    font-size: 24px;
}

.search-box {
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.full-width {
    flex-basis: 100%;
}

label {
    font-size: 12px;
    font-weight: 600;
    color: #65676b;
}

input, textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background: #f0f2f5;
    font-family: inherit;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #1877f2;
    background: #fff;
}

.actions {
    display: flex;
    margin-top: 10px;
}

button {
    padding: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    color: white;
    transition: opacity 0.2s;
    width: 100%;
}

button:hover { opacity: 0.9; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background-color: #1877f2; }
.btn-danger { background-color: #e41e3f; }
.btn-stop { background-color: #333; margin-top: 5px; }
.btn-small { 
    padding: 5px 10px; 
    font-size: 12px; 
    width: auto; 
    background: #ddd; 
    color: #333;
}

.log-box {
    background: #1e1e1e;
    color: #00ff00;
    font-family: monospace;
    padding: 10px;
    border-radius: 8px;
    height: 120px;
    overflow-y: auto;
    font-size: 11px;
    margin-top: 5px;
}

.hidden { display: none; }

.control-panel {
    background: #fff;
    padding: 15px;
    margin-top: 15px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.select-all-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.stats { font-weight: bold; color: #1877f2; }

#results-area { margin-top: 20px; }

.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 colunas no mobile */
    gap: 10px;
}

@media (min-width: 600px) {
    .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

.card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.card-img-holder {
    height: 150px;
    background: #eee;
    position: relative;
    overflow: hidden;
}

.card-img-holder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-overlay {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
}

.checkbox-overlay {
    position: absolute;
    top: 5px;
    left: 5px;
    z-index: 10;
}

.product-checkbox {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.card-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    font-size: 13px;
    margin: 0 0 5px 0;
    line-height: 1.3;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-price {
    font-size: 16px;
    font-weight: bold;
    color: #1c1e21;
    margin: 0 0 10px 0;
}

.card-btn {
    display: block;
    text-align: center;
    background: #e4e6eb;
    color: #050505;
    text-decoration: none;
    padding: 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
}

.card-btn:hover { background: #d8dadf; }

/* SIDEBAR */
.sidebar-toggle {
    font-size: 24px;
    cursor: pointer;
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 100;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100%;
    background: white;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    transition: 0.3s;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
}

.sidebar.open { left: 0; }

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    width: auto;
    padding: 0;
}

.menu-items {
    list-style: none;
    padding: 0;
}

.menu-items li {
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    font-weight: 500;
}

.menu-items li.active {
    color: #1877f2;
    background: #f0f2f5;
    border-radius: 8px;
}

.overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 900;
}

.overlay.show { display: block; }

/* MONITOR LIST */
.monitor-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    border-left: 5px solid #1877f2;
}

/* LOGIN PAGE STYLES */
.login-container {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, #f0f2f5 0%, #dbe4f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.login-header { margin-bottom: 30px; }
.login-header h2 { margin: 10px 0 5px; color: #1877f2; }
.login-header p { color: #666; margin: 0; }

/* Responsividade Extra */
@media (max-width: 600px) {
    .search-box { padding: 10px; }
    .card-img-holder { height: 120px; }
}
