/* ==========================================================================
   1. FRONTEND - KASUTAJA VORM (/saated) - MUST DISAIN
   ========================================================================== */

/* Üldine konteiner, hoiab asjad keskel */
.cmwp-frontend-wrap {
    max-width: 600px;
    margin: 0 auto;
    font-family: system-ui, -apple-system, sans-serif;
}

/* Ülesande kirjeldus (Tekst ja pilt) */
.cmwp-desc {
    background: #ffffff; /* Valge taust, et tekst oleks hästi loetav */
    color: #333;
    padding: 20px;
    border-radius: 12px 12px 0 0; /* Ümarad nurgad üleval */
    border-bottom: 2px solid #eee;
    margin-bottom: 0 !important; /* Et vorm oleks kohe vastas */
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}

.cmwp-desc img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin-top: 10px;
}

/* VORM ISE - MUST TAUST */
form.cmwp-form {
    background-color: #000000; /* Süsimust taust */
    padding: 30px;
    border-radius: 0 0 12px 12px; /* Ümarad nurgad all */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    margin-top: 0 !important;
    border: 1px solid #222;
}

/* Sildid (Labels) - VALGE ja SUUR */
.cmwp-form label { 
    color: #ffffff !important; 
    font-weight: bold; 
    font-size: 16px;
    display: block; 
    margin-bottom: 8px; 
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sisestusväljad (Input) */
.cmwp-form input[type="text"],
.cmwp-form input[type="email"],
.cmwp-form input[type="file"] {
    width: 100%; 
    padding: 14px; 
    border-radius: 8px; 
    border: 2px solid #333; 
    background-color: #1a1a1a; /* Tumehall põhi */
    color: #fff; /* Valge tekst kirjutamisel */
    font-size: 16px;
    margin-bottom: 20px; 
    box-sizing: border-box; 
    transition: border-color 0.3s;
}

/* Kui klikid lahtrisse, läheb äär heledaks */
.cmwp-form input:focus {
    border-color: #22c55e;
    outline: none;
}

/* SAADA NUPP */
.cmwp-form button {
    background: #22c55e; /* Erkroheline */
    color: #fff; 
    padding: 18px 30px; 
    border: 0; 
    border-radius: 8px; 
    font-size: 20px; 
    cursor: pointer; 
    font-weight: 800; 
    width: 100%; 
    text-transform: uppercase;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

.cmwp-form button:hover { 
    background: #16a34a; 
    transform: translateY(-2px);
}

/* ==========================================================================
   2. ADMIN PANEEL (/saated-admin) - EILE PARANDATUD VERSIOON
   ========================================================================== */

.cmwp-admin-wrap { 
    background: #fff; 
    padding: 25px; 
    border-radius: 12px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.05); 
    max-width: 100%; 
    margin: 20px 0; 
    box-sizing: border-box;
}

.active-box { 
    background: #fff1f2; 
    padding: 15px; 
    border-radius: 8px; 
    border: 1px solid #fecdd3; 
    margin-bottom: 20px; 
    text-align: center; 
}

.control-panel { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 10px; 
    align-items: center; 
    margin-bottom: 20px; 
    padding-bottom: 20px; 
    border-bottom: 1px solid #eee; 
}

.control-panel select { padding: 8px; font-size: 14px; min-width: 200px; }

.wheel-controls { display: flex; gap: 15px; margin-bottom: 30px; flex-wrap: wrap; }
.wheel-controls button { padding: 12px 20px; border: 0; border-radius: 6px; cursor: pointer; font-weight: bold; color: #fff; font-size: 14px; }
.btn-spin { background: #16a34a; flex-grow: 2; }
.btn-reset { background: #2563eb; flex-grow: 1; }
.btn-delete-all { background: #dc2626; flex-grow: 1; }

.grid-list { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); 
    gap: 20px; 
    width: 100%;
}

.entry-card { 
    border: 1px solid #e5e7eb; 
    border-radius: 10px; 
    padding: 15px; 
    background: #f9fafb; 
    position: relative; 
    display: flex;
    flex-direction: column;
    overflow: hidden; 
}

.entry-card.approved { background: #dcfce7; border-color: #86efac; }
.entry-card .header { font-size: 18px; font-weight: bold; margin-bottom: 5px; word-break: break-all; }
.entry-card .email, .entry-card .ip { font-size: 12px; color: #6b7280; margin-bottom: 2px; }

/* Pildi kast adminis */
.entry-card .img-wrap { 
    margin: 10px 0; 
    height: 150px; 
    width: 100%;
    background: #eee; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 6px; 
    overflow: hidden; 
    border: 1px solid #ddd;
}

.entry-card .img-wrap img { 
    width: 100% !important; 
    height: 100% !important; 
    object-fit: cover !important; 
    max-width: none !important; 
    display: block;
}

.btn-del { 
    background: #dc2626; 
    color: #fff; 
    padding: 8px; 
    border: 0; 
    width: 100%; 
    border-radius: 4px; 
    cursor: pointer; 
    margin-top: auto; 
}

.ip-warn { background: #fee2e2; color: #991b1b; padding: 5px; border-radius: 4px; font-size: 11px; font-weight: bold; margin-top: 5px; border: 1px solid #fecaca; }