/* Membership Manager QR - Main Styles v2.1 */

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

/* Card Layout */
.mmgr-card {
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 15px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.mmgr-card h2 {
    text-align: center;
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #333;
}

.mmgr-card h3 {
    margin-top: 20px;
    color: #333;
}

/* Form Fields */
.mmgr-field {
    margin-bottom: 15px;
}

.mmgr-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
    color: #444;
}

.mmgr-card input[type=text],
.mmgr-card input[type=email],
.mmgr-card input[type=number],
.mmgr-card input[type=tel],
.mmgr-card input[type=date],
.mmgr-card select,
.mmgr-card textarea {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background: #fff;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
}

.mmgr-card input:focus,
.mmgr-card select:focus,
.mmgr-card textarea:focus {
    border-color: #3676d3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(54, 118, 211, 0.1);
}

/* Alerts */
.mmgr-err,
.mmgr-ok {
    margin: 0 0 15px 0;
    border-radius: 6px;
    padding: 12px;
    font-size: 14px;
    animation: slideIn 0.3s ease-out;
}

.mmgr-err {
    background: #ffe2e2;
    color: #9c1b1b;
    border: 1px solid #ebb2b2;
}

.mmgr-ok {
    background: #e2ffe8;
    color: #159742;
    border: 1px solid #b1e6bf;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons */
.mmgr-card button[type=submit],
.mmgr-submit-btn {
    background: #3676d3;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    padding: 14px 20px;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    -webkit-appearance: none;
    appearance: none;
    transition: background 0.2s;
}

.mmgr-card button[type=submit]:hover,
.mmgr-submit-btn:hover {
    background: #2563bb;
}

.mmgr-card button[type=submit]:active,
.mmgr-submit-btn:active {
    background: #1e4d99;
}

/* Camera Section */
.mmgr-cam {
    border: 2px solid #3676d3;
    border-radius: 8px;
    padding: 12px;
    margin: 15px 0;
    background: #f0f5ff;
}

.mmgr-cam h4 {
    margin: 0 0 10px 0;
    color: #2573dc;
    font-size: 16px;
}

#mmgr-v,
#mmgr-p {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    display: none;
    margin-bottom: 10px;
    background: #000;
}

/* Camera Buttons */
.mmgr-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.mmgr-btns button {
    flex: 1;
    min-width: 100px;
    padding: 12px 10px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    -webkit-appearance: none;
    appearance: none;
    transition: all 0.2s;
}

.mmgr-btns .start {
    background: #2573dc;
    color: #fff;
}

.mmgr-btns .start:hover {
    background: #1e5db8;
}

.mmgr-btns .capture {
    background: #27ae60;
    color: #fff;
}

.mmgr-btns .capture:hover {
    background: #1f8a44;
}

.mmgr-btns .stop {
    background: #e74c3c;
    color: #fff;
}

.mmgr-btns .stop:hover {
    background: #c0392b;
}

.mmgr-btns .retake {
    background: #f39c12;
    color: #fff;
}

.mmgr-btns .retake:hover {
    background: #d68910;
}

/* Loading */
.mmgr-loading {
    display: none;
    text-align: center;
    padding: 10px;
    color: #2573dc;
    font-weight: 600;
    font-size: 14px;
}

/* Code of Conduct Section */
.mmgr-coc-section {
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f9f9f9;
    margin: 15px 0;
    padding: 12px;
}

.mmgr-coc-section strong {
    font-size: 15px;
    display: block;
    margin-bottom: 8px;
}

.mmgr-coc-display {
    max-height: 120px;
    overflow-y: auto;
    background: #000000;
    padding: 10px;
    margin: 8px 0;
    border-radius: 4px;
    font-size: 13px;
    color: #ff00ff;
    line-height: 1.6;
}

.mmgr-coc-display::-webkit-scrollbar {
    width: 6px;
}

.mmgr-coc-display::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.mmgr-coc-display::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 3px;
}

.mmgr-coc-spacer {
    height: 15px;
}

.mmgr-coc-agree {
    font-weight: 600;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.mmgr-coc-agree input {
    width: auto;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Check-in Container */
.mmgr-checkin-container {
    max-width: 600px;
    margin: 30px auto;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.mmgr-checkin-container h2 {
    text-align: center;
    margin-top: 0;
    color: #333;
}

/* Mode Buttons */
.mmgr-mode-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.mmgr-mode-buttons button {
    padding: 10px 15px;
    border: 2px solid #ddd;
    background: #f9f9f9;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    -webkit-appearance: none;
    appearance: none;
    font-size: 14px;
    transition: all 0.2s;
}

.mmgr-mode-buttons button:hover {
    border-color: #3676d3;
    background: #f0f5ff;
}

.mmgr-mode-buttons button.active {
    background: #3676d3;
    color: #fff;
    border-color: #3676d3;
}

/* Camera Mode */
.mmgr-cam-mode {
    display: block;
}

.mmgr-cam-mode video {
    width: 100%;
    border-radius: 8px;
    display: none;
    background: #000;
    margin-bottom: 10px;
}

.mmgr-cam-mode button {
    width: 100%;
    padding: 12px;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
    font-size: 16px;
    -webkit-appearance: none;
    appearance: none;
    transition: all 0.2s;
}

#btn-start {
    background: #27ae60;
}

#btn-start:hover {
    background: #1f8a44;
}

#btn-stop {
    background: #e74c3c;
    display: none;
}

#btn-stop:hover {
    background: #c0392b;
}

/* Manual Mode */
.mmgr-manual-mode {
    display: none;
}

#man-code,
#hw-code {
    width: 100%;
    padding: 14px;
    border: 2px solid #ddd;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 16px;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s;
}

#man-code:focus,
#hw-code:focus {
    border-color: #3676d3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(54, 118, 211, 0.1);
}

.mmgr-manual-mode button,
.mmgr-hardware-mode button {
    width: 100%;
    padding: 12px;
    background: #3676d3;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 16px;
    -webkit-appearance: none;
    appearance: none;
    transition: background 0.2s;
}

.mmgr-manual-mode button:hover,
.mmgr-hardware-mode button:hover {
    background: #2563bb;
}

/* Hardware Mode */
.mmgr-hardware-mode {
    display: none;
}

.mmgr-hardware-mode p {
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* Result Display */
.mmgr-result {
    min-height: 50px;
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    background: transparent;
}

/* Code of Conduct Display Page */
.mmgr-coc-page {
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    background: #000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.mmgr-coc-page h2 {
    text-align: center;
    color: #fff;
    font-weight: bold;
    margin-bottom: 25px;
    font-size: 32px;
}

.mmgr-coc-content {
    background: #1a1a1a;
    padding: 25px;
    border-radius: 6px;
    line-height: 1.4;
    font-size: 15px;
    color: #e0e0e0;
}

.mmgr-coc-content h3,
.mmgr-coc-content h4,
.mmgr-coc-content strong,
.mmgr-coc-content b {
    color: #fff !important;
    font-weight: bold !important;
}

.mmgr-coc-content p {
    margin: 0 0 8px 0;
    padding: 0;
}

.mmgr-coc-dash-line {
    color: #C552FF;
    font-weight: 600;
    margin: 0;
    padding: 0;
}

/* Admin Styles */
.mmgr-filter-form {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    margin-bottom: 15px;
}

.mmgr-filter-form label {
    margin-right: 20px;
    font-weight: 600;
}

.mmgr-filter-form input,
.mmgr-filter-form select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
    margin-left: 5px;
}

.mmgr-fee-form {
    display: flex;
    gap: 5px;
    align-items: center;
}

.mmgr-fee-form input,
.mmgr-fee-form textarea {
    padding: 6px;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.mmgr-member-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.mmgr-form-section {
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.mmgr-form-section h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #3676d3;
    padding-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mmgr-coc-page {
        margin: 10px;
        padding: 15px;
    }

    .mmgr-coc-page h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .mmgr-card {
        padding: 15px 10px;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .mmgr-card h2 {
        font-size: 20px;
    }

    .mmgr-field label {
        font-size: 13px;
    }

    .mmgr-btns {
        flex-direction: column;
    }

    .mmgr-btns button {
        width: 100%;
        min-width: auto;
    }

    .mmgr-checkin-container {
        margin: 10px;
        padding: 15px;
    }

    .mmgr-mode-buttons {
        gap: 5px;
    }

    .mmgr-mode-buttons button {
        padding: 8px 10px;
        font-size: 12px;
    }

    #man-code,
    #hw