/**
 * EMS Membership - Public Styles
 */

/* General */
.ems-member-profile,
.ems-member-login {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Notices */
.ems-notice {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.ems-notice-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ems-notice-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ems-notice-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.ems-notice-info {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

/* Profile Header */
.ems-profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.ems-profile-avatar img {
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ems-profile-info h2 {
    margin: 0 0 5px;
    font-size: 24px;
}

.ems-profile-email {
    color: #666;
    margin: 0 0 10px;
}

.ems-profile-status {
    margin: 0;
}

/* Status Badges */
.ems-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.ems-status-active {
    background: #d4edda;
    color: #155724;
}

.ems-status-inactive {
    background: #f8d7da;
    color: #721c24;
}

/* Societies List */
.ems-profile-societies {
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.ems-profile-societies h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1d2327;
}

.ems-profile-societies ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ems-profile-societies li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.ems-profile-societies li:last-child {
    border-bottom: none;
}

.ems-society-fullname {
    display: block;
    color: #666;
    font-size: 14px;
    margin-top: 2px;
}

/* Forms */
.ems-profile-form,
.ems-login-form {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
}

.ems-profile-form h3 {
    margin-top: 30px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: #1d2327;
}

.ems-profile-form h3:first-child {
    margin-top: 0;
}

.ems-form-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.ems-form-row {
    margin-bottom: 20px;
}

.ems-form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.ems-form-row-3col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .ems-form-row-2col,
    .ems-form-row-3col {
        grid-template-columns: 1fr;
    }
}

.ems-form-field {
    margin-bottom: 15px;
}

.ems-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #1d2327;
}

.ems-form-field input[type="text"],
.ems-form-field input[type="email"],
.ems-form-field input[type="tel"],
.ems-form-field input[type="password"],
.ems-form-field select,
.ems-form-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.ems-form-field input:focus,
.ems-form-field select:focus,
.ems-form-field textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.ems-form-field-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
}

.ems-form-field-checkbox input[type="checkbox"] {
    width: auto;
}

/* Buttons */
.ems-form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.ems-button {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.ems-button-primary {
    background: #0073aa;
    color: #fff;
}

.ems-button-primary:hover {
    background: #005a87;
    color: #fff;
}

.ems-button-secondary {
    background: #f0f0f0;
    color: #1d2327;
}

.ems-button-secondary:hover {
    background: #e0e0e0;
    color: #1d2327;
}

/* Login Form */
.ems-login-form {
    max-width: 400px;
    margin: 0 auto;
}

.ems-login-links {
    margin-top: 20px;
    text-align: center;
}

.ems-login-links a {
    color: #0073aa;
    text-decoration: none;
}

.ems-login-links a:hover {
    text-decoration: underline;
}

.ems-login-info {
    max-width: 400px;
    margin: 30px auto 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.ems-login-info p {
    margin: 0 0 10px;
}

.ems-login-info p:last-child {
    margin-bottom: 0;
}

/* Restricted Content */
.ems-restricted-content {
    padding: 40px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.ems-restricted-content p {
    margin: 0 0 15px;
    color: #666;
}

.ems-restricted-content .button,
.ems-restricted-content .ems-button {
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 480px) {
    .ems-profile-header {
        flex-direction: column;
        text-align: center;
    }

    .ems-form-actions {
        flex-direction: column;
    }

    .ems-button {
        width: 100%;
        text-align: center;
    }
}

/* ========================================
   MY SOCIETY DASHBOARD (Frontend)
   ======================================== */

.ems-my-society-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Society Selector */
.ems-society-selector {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.ems-society-selector label {
    margin-right: 10px;
    font-weight: 500;
}

.ems-society-selector select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Society Header */
.ems-society-header {
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.ems-society-header h3 {
    margin: 0 0 5px;
    font-size: 24px;
    color: #1d2327;
}

.ems-society-header .ems-society-fullname {
    color: #666;
    font-size: 16px;
    margin-bottom: 10px;
}

.ems-society-header .ems-society-stats {
    margin: 0;
    color: #333;
}

/* Actions Bar */
.ems-society-actions {
    margin-bottom: 20px;
}

/* Search Box */
.ems-search-box {
    margin-bottom: 20px;
}

.ems-search-box form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ems-search-box input[type="search"] {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.ems-search-box input[type="search"]:focus {
    outline: none;
    border-color: #0073aa;
}

/* Members Table */
.ems-members-table-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
}

.ems-members-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.ems-members-table thead {
    background: #f8f9fa;
}

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

.ems-members-table th {
    font-weight: 600;
    color: #1d2327;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ems-members-table tbody tr:hover {
    background: #f8f9fa;
}

.ems-members-table tbody tr:last-child td {
    border-bottom: none;
}

.ems-members-table td a {
    color: #0073aa;
    text-decoration: none;
}

.ems-members-table td a:hover {
    text-decoration: underline;
}

/* Table Actions */
.ems-members-table .ems-actions {
    white-space: nowrap;
}

.ems-button-small {
    padding: 6px 12px;
    font-size: 13px;
}

.ems-button-danger {
    background: #dc3545;
    color: #fff;
}

.ems-button-danger:hover {
    background: #c82333;
    color: #fff;
}

/* Pagination */
.ems-pagination {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 20px;
}

.ems-page-link {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
}

.ems-page-link:hover {
    background: #f0f0f0;
    color: #333;
}

.ems-page-link.ems-current {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

/* Form Header */
.ems-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.ems-form-header h3 {
    margin: 0;
    font-size: 22px;
    color: #1d2327;
}

/* Form Styles */
.ems-form {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
}

.ems-form fieldset {
    border: none;
    padding: 0;
    margin: 0 0 30px;
}

.ems-form fieldset:last-of-type {
    margin-bottom: 0;
}

.ems-form legend {
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    width: 100%;
}

.ems-form .ems-form-row {
    margin-bottom: 20px;
}

.ems-form .ems-form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #1d2327;
}

.ems-form .ems-form-row input[type="text"],
.ems-form .ems-form-row input[type="email"],
.ems-form .ems-form-row input[type="tel"],
.ems-form .ems-form-row input[type="password"],
.ems-form .ems-form-row select,
.ems-form .ems-form-row textarea {
    width: 100%;
    max-width: 500px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
}

.ems-form .ems-form-row input:focus,
.ems-form .ems-form-row select:focus,
.ems-form .ems-form-row textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.ems-form .ems-form-row input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.ems-field-description {
    margin-top: 5px;
    font-size: 13px;
    color: #666;
}

.required {
    color: #dc3545;
}

/* Responsive Table */
@media (max-width: 768px) {
    .ems-hide-mobile {
        display: none;
    }

    .ems-members-table th,
    .ems-members-table td {
        padding: 10px;
        font-size: 14px;
    }

    .ems-form-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .ems-society-actions,
    .ems-search-box {
        width: 100%;
    }

    .ems-society-actions .ems-button {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .ems-my-society-wrapper {
        padding: 10px;
    }

    .ems-members-table .ems-actions {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .ems-button-small {
        width: 100%;
        text-align: center;
    }
}
