/* --- RESET & BASIC --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #f4f6f8;
    color: #333;
    line-height: 1.6;
    padding-bottom: 60px; /* Space for footer */
}

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* --- HEADER & NAV --- */
header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px 0;
    margin-bottom: 20px;
}

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

.logo img {
    height: 50px;
    width: auto;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover, nav a.active {
    color: #007bff;
}

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-primary { background: #007bff; color: white; }
.btn-primary:hover { background: #0056b3; }

.btn-danger { background: #dc3545; color: white; }
.btn-danger:hover { background: #a71d2a; }

.btn-success { background: #28a745; color: white; }
.btn-success:hover { background: #218838; }

.btn-whatsapp { background: #25D366; color: white; }
.btn-whatsapp:hover { background: #1da851; }

.btn-small { padding: 5px 10px; font-size: 12px; }

/* --- CARDS & DASHBOARD --- */
.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card-header {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.stat-box.alert { border-left-color: #dc3545; }
.stat-box h3 { font-size: 24px; margin-bottom: 5px; }
.stat-box p { font-size: 14px; color: #666; }

/* --- TABLES --- */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 14px;
}

table th, table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background-color: #f1f1f1;
    font-weight: 600;
}

table tr:hover { background-color: #f9f9f9; }

.stock-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}
.badge-ok { background: #d4edda; color: #155724; }
.badge-low { background: #f8d7da; color: #721c24; }

/* --- FORMS --- */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

input:focus {
    outline: none;
    border-color: #007bff;
}

/* --- FOOTER --- */
footer {
    background: #fff;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 13px;
    color: #777;
}

footer a { color: #007bff; text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* --- UTILITIES --- */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none !important; }

/* --- LOADING & ALERTS --- */
#loading { text-align: center; padding: 20px; color: #666; }
.alert-box {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }