/* Main Container Styles */
:root {
    --scdp-primary: #000000;
    --scdp-primary-hover: #333333;
    --scdp-bg: #f5f5f7;
    --scdp-card-bg: #ffffff;
    --scdp-text: #1d1d1f;
    --scdp-text-light: #86868b;
    --scdp-border: #d2d2d7;
    --scdp-radius: 12px;
    --scdp-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.scdp-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    max-width: 960px;
    margin: 60px auto;
    color: var(--scdp-text);
    padding: 0 20px;
}

/* Login Form */
/* Login Form */
.scdp-login-form {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.scdp-login-form form {
    background: var(--scdp-card-bg);
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    border: 1px solid rgba(0, 0, 0, 0.02);
    box-sizing: border-box;
}

.scdp-form-group {
    margin-bottom: 24px;
}

.scdp-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--scdp-text);
    font-size: 14px;
}

.scdp-form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fbfbfd;
    color: var(--scdp-text);
    box-sizing: border-box;
    -webkit-appearance: none;
}

.scdp-form-group input:focus {
    border-color: #0071e3;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.scdp-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #0071e3 0%, #0077ed 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.2);
    margin-top: 10px;
}

.scdp-submit-btn:hover {
    background: linear-gradient(135deg, #0077ed 0%, #0082fa 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 113, 227, 0.3);
}

.scdp-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.2);
}

.scdp-error-message {
    background: #fff2f2;
    color: #d70015;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 15px;
    border: 1px solid #ffcfcf;
    text-align: center;
}

/* Dashboard: User Info Card */
/* Dashboard Layout */
.scdp-dashboard-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.scdp-dashboard-left {
    flex: 0 0 30%;
    max-width: 30%;
}

.scdp-dashboard-right {
    flex: 1;
    max-width: 70%;
}

/* User Card (Left Side) */
.scdp-user-card {
    background: var(--scdp-card-bg);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--scdp-shadow);
    text-align: center;
    margin-bottom: 20px;
}

.scdp-user-photo {
    margin-bottom: 20px;
}

.scdp-user-photo img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.scdp-user-details h2 {
    margin: 0 0 10px 0;
    font-size: 22px;
    font-weight: 600;
    color: var(--scdp-text);
}

.scdp-user-details p {
    margin: 5px 0;
    color: var(--scdp-text-light);
    font-size: 14px;
}

.scdp-user-details strong {
    color: var(--scdp-text);
}

/* Logout Button Block */
.scdp-btn-block {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

/* Logout Button */
.scdp-logout-section {
    text-align: center;
    margin-top: 40px;
}

.scdp-btn {
    display: inline-block;
    cursor: pointer;
    text-decoration: none;
}

.scdp-btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: var(--scdp-text);
    border: none;
    padding: 10px 24px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease;
}

.scdp-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #000;
}

/* Table Design */
.scdp-section {
    margin-bottom: 40px;
}

.scdp-section-title,
.scdp-section h3 {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--scdp-text);
}

.scdp-certificate-table-wrapper,
.scdp-table-responsive {
    background: var(--scdp-card-bg);
    border-radius: 16px;
    box-shadow: var(--scdp-shadow);
    overflow: hidden;
    border: none;
    margin-bottom: 0;
}

.scdp-table {
    width: 100%;
    border-collapse: collapse;
}

.scdp-table th {
    background: #fafafa;
    padding: 16px 24px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--scdp-text-light);
    font-weight: 600;
    border-bottom: 1px solid #e5e5e5;
    text-align: left;
}

.scdp-table td {
    padding: 20px 24px;
    vertical-align: middle;
    border-bottom: 1px solid #f5f5f7;
    color: var(--scdp-text);
    font-size: 15px;
}

.scdp-table tr:last-child td {
    border-bottom: none;
}

.scdp-btn-primary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 8px 16px;
    background: #f2f2f7;
    color: #0071e3;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.scdp-btn-primary:hover {
    background: #e5e5ea;
    color: #0077ed;
    text-decoration: none;
}

.scdp-important-note {
    background: #fff8eb;
    border: 1px solid #feecce;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    color: #7a4f01;
}

.scdp-important-note h3 {
    color: #925f02;
    margin-top: 0;
    font-size: 18px;
    margin-bottom: 10px;
}

.scdp-important-note p {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
    .scdp-dashboard {
        margin: 20px auto;
        padding: 0 15px;
    }

    .scdp-dashboard-wrapper {
        flex-direction: column;
    }

    .scdp-dashboard-left,
    .scdp-dashboard-right {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
    }

    /* Compact User Card on Mobile */
    .scdp-user-card {
        padding: 15px;
        display: flex;
        align-items: center;
        text-align: left;
        gap: 15px;
        margin-bottom: 20px;
    }

    .scdp-user-photo {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .scdp-user-photo img {
        width: 80px;
        height: 80px;
        border-width: 2px;
    }

    .scdp-user-details h2 {
        font-size: 18px;
        margin-bottom: 4px;
    }

    .scdp-user-details p {
        font-size: 13px;
        margin: 2px 0;
    }

    /* Move logout button next to details or keep below? 
       User said "compact", so maybe keep it distinct but compact.
       However, the structure is:
       .scdp-dashboard-left > .scdp-user-card
       .scdp-dashboard-left > .scdp-logout-section
       
       So the logout section is outside the card.
    */
    .scdp-logout-section {
        margin-top: 20px;
        /* If we want it really compact, maybe we should put it inline? 
           But it's in a different div. Let's keep it as a block button below the compact card for now,
           but maybe reduce margin.
        */
        margin-top: 10px;
        margin-bottom: 20px;
    }

    .scdp-certificate-table-wrapper {
        border-radius: 12px;
    }

    /* Card view for table rows */
    .scdp-table thead {
        display: none;
    }

    .scdp-table,
    .scdp-table tbody,
    .scdp-table tr,
    .scdp-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .scdp-table tr {
        border-bottom: 1px solid #e5e5e5;
    }

    .scdp-table tr:last-child {
        border-bottom: none;
    }

    .scdp-table td {
        padding: 12px 20px;
        text-align: left;
        border: none;
        display: block;
    }

    .scdp-table td:first-child {
        font-weight: 600;
        font-size: 16px;
        background: #fafafa;
        border-bottom: 1px solid #f0f0f0;
        padding-top: 15px;
        padding-bottom: 15px;
    }

    .scdp-table td:last-child {
        padding-bottom: 20px;
        text-align: center;
    }

    .scdp-btn-primary {
        width: 100%;
    }
}

/* Admin Styles */
#scdp-certificates-wrapper {
    margin-bottom: 20px;
}

.scdp-certificate-row {
    background: #fff;
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
}

.scdp-certificate-row h4 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.scdp-remove-certificate {
    color: #a00;
    cursor: pointer;
}

.scdp-remove-certificate:hover {
    color: #dc3232;
}