/*
|--------------------------------------------------------------------------
| GLOBAL STYLES
|--------------------------------------------------------------------------
*/
* {
    box-sizing: border-box;
}

/*
|--------------------------------------------------------------------------
| DASHBOARD LAYOUT
|--------------------------------------------------------------------------
*/

.eca-dashboard {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

/*
|--------------------------------------------------------------------------
| HERO SECTION
|--------------------------------------------------------------------------
*/

.eca-hero {
    text-align: center;
    margin-bottom: 35px;
}

.eca-hero h1 {
    font-size: 48px;
    color: #123d6b;
    margin-bottom: 15px;
}

.eca-hero p {
    font-size: 20px;
    color: #666;
}

/*
|--------------------------------------------------------------------------
| DASHBOARD CARDS
|--------------------------------------------------------------------------
*/

.eca-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
    margin-bottom: 50px;
}

.eca-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    border: 1px solid #ececec;
    transition: all 0.2s ease;
}

.eca-card:hover {
    transform: translateY(-5px);
}

.eca-card h2 {
    margin-top: 0;
    color: #123d6b;
    font-size: 28px;
    margin-bottom: 15px;
}

.eca-card p {
    color: #666;
    line-height: 1.6;
}

/*
|--------------------------------------------------------------------------
| SNAPSHOT SECTION
|--------------------------------------------------------------------------
*/

.eca-snapshot {
    background: #f5f8fb;
    border-radius: 16px;
    padding: 35px 40px;
    margin-bottom: 50px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.eca-snapshot h2 {
    color: #123d6b;
    margin-bottom: 25px;
}

.eca-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: stretch;

    max-width: 90%;
    margin: 0 auto;
}

.eca-stat-box {
    background: white;
    border-radius: 14px;
    padding: 22px;
    text-align: center;
    box-shadow: 0 3px 12px rgba(0,0,0,0.06);
}

.eca-stat-number {
    display: block;
    font-size: 40px;
    font-weight: bold;
    color: #0d7a5f;
    margin-bottom: 10px;
}

.eca-stat-label {
    color: #666;
    font-size: 16px;
}

/*
|--------------------------------------------------------------------------
| ATTENDANCE MODULE
|--------------------------------------------------------------------------
*/

.eca-frontend-attendance {
    padding: 40px 20px;
}
.eca-attendance-module {
    background: white;
    border-radius: 18px;
    padding: 32px;
    margin-top: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.eca-main-attendance {
    margin-bottom: 50px;
}

.eca-module-header {
    margin-bottom: 30px;
}

.eca-module-header h2 {
    font-size: 38px;
    color: #123d6b;
    margin-bottom: 10px;
}

.eca-module-header p {
    color: #666;
    font-size: 17px;
}

.eca-attendance-module select,
.eca-attendance-module input[type="date"] {
    padding: 12px 14px;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    font-size: 15px;
}

.eca-attendance-module input[type="submit"] {
    background: #123d6b;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: 0.2s ease;
}

.eca-attendance-module input[type="submit"]:hover {
    background: #0d2f52;
}
.eca-snapshot {
    margin-bottom: 30px;
}

.eca-attendance-module {
    margin-top: 20px;
}

.eca-dashboard {
    padding-bottom: 0px;
}

/*
|--------------------------------------------------------------------------
| VISITOR MODULE
|--------------------------------------------------------------------------
*/

.eca-visitor-module {
    background: #f8fafc;
    border-radius: 14px;
    padding: 25px;
    margin-top: 30px;
    border: 1px solid #e4e7eb;
}

.eca-visitor-module h3 {
    margin-top: 0;
    color: #123d6b;
}

.eca-visitor-module input,
.eca-visitor-module textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    box-sizing: border-box;
}

.eca-visitor-module textarea {
    min-height: 100px;
}

.eca-visitor-module input[type="submit"] {
    width: auto;
}

.eca-add-visitor-button {
    display: inline-block;
    margin-left: 15px;
    padding: 12px 18px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #123d6b;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s ease;
}

.eca-add-visitor-button:hover {
    background: #dbe7f3;
}

/*
|--------------------------------------------------------------------------
| MODALS
|--------------------------------------------------------------------------
*/

.eca-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.eca-modal-content {
    background: white;
    padding: 35px;
    border-radius: 18px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.eca-modal-content h2 {
    margin-top: 0;
    color: #123d6b;
}

.eca-modal-content input,
.eca-modal-content textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    box-sizing: border-box;
}

.eca-modal-content textarea {
    min-height: 100px;
}

.eca-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #666;
}

/*
|--------------------------------------------------------------------------
| ATTENDANCE CONTROLS
|--------------------------------------------------------------------------
*/

.eca-attendance-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.eca-control-group {
    flex: 1;
}

.eca-control-group select,
.eca-control-group input {
    width: 100%;
    box-sizing: border-box;
}

/*
|--------------------------------------------------------------------------
| FOLLOW-UP MODULES
|--------------------------------------------------------------------------
*/

.eca-followup-module {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    margin-top:20px;
    margin-bottom: 40px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    border: 1px solid #ececec;
}

.eca-followup-module h2 {
    margin-top: 0;
    color: #123d6b;
    margin-bottom: 10px;
}

.eca-visitor-followup-title {
    margin-top: 0;
    color: #123d6b;
    font-size: 28px;
    margin-bottom: 15px;
    font-weight: 500;
}

.eca-followup-module p {
    color: #666;
}

.eca-followup-module table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.eca-followup-module th {
    text-align: left;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
    color: #123d6b;
}

.eca-followup-module td {
    padding: 14px 0;
    border-bottom: 1px solid #f1f1f1;
}

/*
|--------------------------------------------------------------------------
| MOBILE RESPONSIVE
|--------------------------------------------------------------------------
*/

@media (max-width: 768px) {

    .eca-attendance-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .eca-stats {
        grid-template-columns: 1fr;
    }

    .eca-hero h1 {
        font-size: 34px;
        line-height: 1.1;
    }

}

/*
|--------------------------------------------------------------------------
| VISITOR ADMIN STYLING
|--------------------------------------------------------------------------
*/

.eca-admin-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 35px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    border: 1px solid #ececec;
}

.eca-admin-card h2 {
    margin-top: 0;
    color: #123d6b;
    font-size: 32px;
    margin-bottom: 20px;
}

.eca-admin-card table.form-table th {
    color: #123d6b;
    font-weight: 600;
    padding-bottom: 18px;
}

.eca-admin-card input[type="text"],
.eca-admin-card input[type="email"],
.eca-admin-card input[type="date"],
.eca-admin-card textarea {
    width: 100%;
    max-width: 500px;
    padding: 12px 14px;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    font-size: 15px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
}

.eca-admin-card textarea {
    min-height: 120px;
}

.eca-admin-card .button-primary {
    background: #123d6b;
    border-color: #123d6b;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 600;
}

.eca-admin-card .button-primary:hover {
    background: #0d2f52;
    border-color: #0d2f52;
}

.eca-admin-card .button {
    border-radius: 8px;
    padding: 8px 16px;
}

/*
|--------------------------------------------------------------------------
| VISITOR TABLES
|--------------------------------------------------------------------------
*/

.eca-visitors-table {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    border: 1px solid #ececec;
}

.eca-visitors-table table {
    width: 100%;
    border-collapse: collapse;
}

.eca-visitors-table th {
    background: #f8fafc;
    color: #123d6b;
    text-align: left;
    padding: 16px;
    font-size: 15px;
}

.eca-visitors-table td {
    padding: 16px;
    border-top: 1px solid #f1f1f1;
}

.eca-visitors-table tr:hover {
    background: #f9fbfd;
}

.eca-visitors-table {
    width: 100%;
    border-collapse: collapse;
}

.eca-visitors-table th {
    text-align: left;
    padding: 16px;
    color: #123d6b;
    font-size: 20px;
    border-bottom: 1px solid #ececec;
}

.eca-visitors-table td {
    padding: 16px;
    border-bottom: 1px solid #f1f1f1;
    font-size: 14px;
}

.eca-visitors-table tr:last-child td {
    border-bottom: none;
}

/*
|--------------------------------------------------------------------------
| VISITOR STAT CARDS
|--------------------------------------------------------------------------
*/

.eca-stat-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 25px;
    margin-bottom: 35px;
}

.eca-stat-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 35px 30px;
    min-width: 180px;
    text-align: center;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    border: 1px solid #ececec;
}

.eca-stat-number {
    display: block;
    font-size: 56px;
    font-weight: 700;
    color: #0b7a75;
    margin-bottom: 10px;
}

.eca-stat-label {
    font-size: 18px;
    color: #666;
}

/*
|--------------------------------------------------------------------------
| BUTTONS
|--------------------------------------------------------------------------
*/

.eca-add-visitor-dashboard-button {

    width:100%;
    height:100%;

    padding:0 30px;

    display:flex;
    align-items:center;
    justify-content:center;

    text-align:center;

    border:none;

    background:#ffffff;
    color:#123d6b;

    border:1px solid #ececec;

    box-shadow:0 4px 18px rgba(0,0,0,0.08);

    font-size:26px;
    font-weight:700;

    border-radius:20px;

    cursor:pointer;
}


.eca-add-visitor-dashboard-button:hover {

    transform: translateY(-3px);

}

.eca-cancel-button {

    display:inline-block;

    margin-left:15px;

    padding:12px 18px;

    border-radius:8px;

    background:#777;

    color:#ffffff;

    border:none;

    font-weight:600;

    transition:0.2s ease;

    cursor:pointer;

}

.eca-cancel-button:hover {

    background:#555;

}

.eca-mark-all-button {

    display:inline-block;

    padding:10px 18px;

    background:#1b7f6b;

    color:#ffffff;

    border:none;

    border-radius:8px;

    font-weight:600;

    cursor:pointer;

    transition:0.2s ease;

}

.eca-mark-all-button:hover {

    background:#146454;

}

.eca-add-visitor-stat-box {

    grid-column: 2 / 4;
}

/*
|--------------------------------------------------------------------------
| I_Phone Overflow
|--------------------------------------------------------------------------
*/

.eca-table-scroll {
    width: 100%;
    overflow-x: auto;
}

/* OLD TABLE OVERFLOW RULE - DISABLED

@media (max-width: 768px) {

    .eca-visitors-table {
        min-width: 700px;
    }

}

*/

/* =====================================
   VISITOR FOLLOW-UP MOBILE FIX
   =====================================*/

.eca-visitor-followup-title {
    margin-top: 40px;
    margin-bottom: 20px;
}

.eca-stat-grid,
.eca-stats {
    align-items: stretch;
}
     

@media (max-width: 768px) {

   .eca-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    justify-content: center;
}

    .eca-stat-box {
        width: 100%;
        min-height: 140px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .eca-add-visitor-stat-box {
        grid-column: 1 / -1;
    }

    .eca-add-visitor-dashboard-button {
        min-height: 120px;
    }
}

/* =====================================
   RECENT VISITORS MOBILE CARDS
   ===================================== */

@media (max-width: 768px) {

   .eca-visitors-table,
.eca-visitors-table tbody {
    display: block;
    width: 100%;
}

.eca-visitors-table tr {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.eca-visitors-table td {
    display: block;
}

    .eca-visitors-table thead {
        display: none;
    }

    .eca-visitors-table tr {
        background: #fff;
        border: 1px solid #ececec;
        border-radius: 12px;
        padding: 15px;
        margin-bottom: 15px;
        box-shadow: 0 2px 8px rgba(0,0,0,.05);
    }

    .eca-visitors-table td {
        border: none;
        padding: 4px 0;
    }

    .eca-visitors-table td:nth-child(1) {
        font-size: 20px;
        font-weight: 600;
        color: #123d6b;
        margin-bottom: 6px;
    }

    .eca-visitors-table td:nth-child(2)::before {
        content: "Visit: ";
        font-weight: 600;
    }

    .eca-visitors-table td:nth-child(3)::before {
        content: "Status: ";
        font-weight: 600;
    }

    .eca-visitors-table td:last-child {
        margin-top: 12px;
    }
}

@media (max-width: 768px) {

    .eca-visitor-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .eca-visitor-actions button {
        width: 100%;
        display: block;
    }

}

/* =====================================
   MEMBER FOLLOW-UP MOBILE CARDS
   ===================================== */

@media (max-width: 768px) {

    .eca-member-followup-table,
    .eca-member-followup-table tbody {
        display: block;
        width: 100%;
    }

    .eca-member-followup-table thead {
        display: none;
    }

    .eca-member-followup-table tr {
        display: block;
        width: 100%;
        background: #fff;
        border: 1px solid #ececec;
        border-radius: 12px;
        padding: 15px;
        margin-bottom: 15px;
        box-shadow: 0 2px 8px rgba(0,0,0,.05);
    }

    .eca-member-followup-table td {
        display: block;
        border: none;
        padding: 4px 0;
        word-break: break-word;
        white-space: normal;
    }

    .eca-member-followup-table td:nth-child(1) {
        font-size: 20px;
        font-weight: 600;
        color: #123d6b;
        margin-bottom: 6px;
    }

    .eca-member-followup-table td:nth-child(2)::before {
        content: "Phone: ";
        font-weight: 600;
    }

    .eca-member-followup-table td:nth-child(3)::before {
        content: "Email: ";
        font-weight: 600;
    }
}
