:root {
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --ink: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --bg: #f4f6fb;
    --error: #b91c1c;
    
    --primary: #2563eb;        /* modern blue */
    --primary-dark: #1d4ed8;
    
    

}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
}

/* --- Login styles --- */
.login-center-logo {
        flex: 1;
        display: flex;
        justify-content: center;
    }
 .login-app-logo {
        height: 80px;
        width: 80px;

    }   
 .home-app-logo   
 {
        height: 70px;
        width: 70px;
        
    }
  .home-header {
    display: flex;
    align-items: center; /* Vertically aligns the image and text */
    gap: 12px;           /* Space between image and heading */
}



.home-header h1 {
    margin: 0;
}  
/* --- Auth page --- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: #fff;
    padding: 35px;
    padding-bottom:20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    
}

.auth-card h1 {
    font-size: 22px;
    margin: 0 0 4px;
}

.auth-subtitle {
    color: var(--muted);
    margin: 0 0 4px;
    font-size: 14px;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    align-self: center;   /* Centers the button */
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    margin-top: 20px;

    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;

    border: 1px solid #2563eb;
    border-radius: 10px;

    font-size: 15px;
    font-weight: 600;

    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.auth-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.logint-form-group {
    margin-bottom: 5px;
}
.login-form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: .9rem;
    font-weight: 600;
    color: #374151;
}

.login-form-group input {
    width: 100%;
    padding: 10px 8px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: .95rem;
    transition: .25s;
    box-sizing: border-box;
}


/* Footer */

.auth-footer {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.auth-footer span {
    display: block;
    font-size: .8rem;
    color: #9ca3af;
    margin-bottom: 5px;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.developer-logo {
    height: 25px;
    width: auto;
    opacity: .85;
    transition: .25s;
}

.developer-logo:hover {
    opacity: 1;
}

label {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 6px;
    margin-top: 14px;
}

input, select {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
    color: var(--ink);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 1px rgba(20, 88, 235, 0.7);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background 0.15s ease;
}

.btn-primary {
    background: var(--blue);
    color: #fff;
    margin-top: 22px;
}

.btn-primary:hover {
    background: var(--blue-dark);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: #fff;
}

.alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 6px;
}

.alert-error {
    background: #fef2f2;
    color: var(--error);
    border: 1px solid #fecaca;
}

/* --- App shell --- */
.app-shell {
    /*max-width: 1000px;*/
    margin: 0 auto;
    padding: 30px 60px 2px;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0 24px;
}

.app-header h1 {
    font-size: 20px;
    margin: 0;
}

.app-header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-badge {
    font-size: 14px;
    color: var(--muted);
    background: #fff;
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 999px;
}


/* Card */
.card {
    background: #fff;
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.card h2 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--ink);
}

/* Form layout */
#generate-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}
/*tWo Column*/
#generate-form{
    display:flex;
    flex-direction:column;
    gap:30px;
}

/* Two columns */
.form-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:40px;
}

.form-column{
    display:flex;
    flex-direction:column;
    gap:3px;
}

/* Labels */
.form-column label{
    font-weight:600;
    color:#4b5563;
    margin-bottom:4px;
}

/* Inputs */
.form-column input,
.form-column select{
    width:100%;
    padding:10px 14px;
    border:1px solid #d1d5db;
    border-radius:8px;
    font-size:14px;
}

/* Skills */
#skills-container{
    display:flex;
    flex-direction:column;
    gap:10px;
}

.skill-row input{
    width:100%;
}

/* Duration */
#duration-section {
    display: block; /* remove flex completely */
    margin-top: 5px;
}

.field {
    display: block;
    margin-bottom: 16px;
}

.field label {
    display: block;
    margin-bottom: 6px;
}

.field input {
    display: block;
    width: 250px;   /* or 100% */
    box-sizing: border-box;
}

/* Center Button */
.button-wrapper{
    display:flex;
    justify-content:center;
}



/* Mobile */
@media (max-width:768px){

    .form-grid{
        grid-template-columns:1fr;
    }

    

}
/*Skill Buttons*/
#add-skill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: 10px 20px;
    

    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;

    border: 1px solid #2563eb;
    border-radius: 10px;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

#add-skill-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

#add-skill-btn:active {
    transform: translateY(0);
}
.remove-skill-btn {
    padding: 8px 16px;
    margin-left: 10px;

    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;

    border: 1px solid #2563eb;
    border-radius: 8px;

    font-size: 13px;
    font-weight: 500;

    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.remove-skill-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
}
/* Labels */
#generate-form label {
    font-size: 15px;
    color: var(--muted);
    margin-bottom: 5px;
    padding-left: 4px;
}

/* Inputs & Selects */
#generate-form input,
#generate-form select {
    width: 100%;
    max-width: 420px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
    color: var(--ink);
    outline: none;
    transition: 0.2s ease;
    margin-bottom: 10px;
}

#generate-form input:focus,
#generate-form select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Skills section */
#skills-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#skills-container {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom:12px;
}

.skill-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.skill-row input {
    width: 100%;
    max-width: 420px;
    flex:1;
}

/* Buttons (global modern style) */
button {
    font-size: 14px;
    border-radius: 10px;
    padding: 10px 14px;
    border: none;
    cursor: pointer;
    transition: 0.2s ease;
    width: fit-content; /* IMPORTANT: prevents full width */
}

/* Primary button */
.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

/* Secondary button */
.btn-secondary {
    background: #eef2ff;
    color: var(--primary);
}

.btn-secondary:hover {
    background: #e0e7ff;
}

/* Submit button spacing */
#generate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-width: 220px;
    padding: 12px 24px;
    margin-top: 20px;

    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;

    border: 1px solid #2563eb;
    border-radius: 10px;

    font-size: 15px;
    font-weight: 600;

    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

#generate-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

#generate-btn:active:not(:disabled) {
    transform: translateY(0);
}

#generate-btn:disabled {
    background: #93c5fd;
    border-color: #93c5fd;
    color: #eff6ff;
    cursor: not-allowed;
    opacity: 0.75;
    box-shadow: none;
    transform: none;
}

/* Message */
#form-message {
    margin-top: 10px;
    font-size: 14px;
    color: var(--muted);
}


/*.card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
    margin-bottom: 24px;
    
}

.card h2 {
    font-size: 16px;
    margin: 0 0 4px;
}

#generate-form {
    padding-left: 30px;
    display: flex;
    flex-direction: column;
}

#generate-form input, #generate-form select{
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 50%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
    color: var(--ink);
}

 #generate-form button {
    display: flex;
    flex-direction: column;
    width: 250px;
    
    align-items: center;
}

#skill-section input, #skill-section select{
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 50%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
    color: var(--ink);
}

 #skill-section button {
    display: flex;
    flex-direction: column;
    width: 250px;
    
    align-items: center;
}*/

.form-message {
    margin-top: 14px;
    font-size: 14px;
}

.form-message.success {
    color: #15803d;
}

.form-message.error {
    color: var(--error);
}

.cert-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 14px;
}

.cert-table th {
    text-align: left;
    color: var(--muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
    padding: 8px 10px;
}

.cert-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border);
}

.cert-table a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
}

.empty-row td {
    color: var(--muted);
    text-align: center;
    padding: 20px;
}



/* simple spinner */
.spinner {
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    display: inline-block;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.brand {
    text-align: center;
    margin-bottom: 2px;
}

.brand h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
    color: #1f2937;
}
.form-group {
    margin-bottom: 10px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: .9rem;
    font-weight: 600;
    color: #374151;
}

.form-group input {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: .95rem;
    transition: .25s;
    box-sizing: border-box;
}

/*Footer Globals*/
.app-footer {
    margin-top: 0px;
    margin-bottom: 20px;
    padding: 10px 20px;
    background: transparent; /* key change */
    color: #94a3b8; /* soft gray-blue */
    font-size: 13px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-left,
.footer-right {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.85;
}

.footer-developer {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-logo {
    height: 18px;   /* control size */
    width: auto;
    display: block; /* removes baseline misalignment */
}

/* Optional: remove extra visual weight from separators */
.footer-right span {
    color: #94a3b8;
}
.footer-content {
    justify-content: center;
    text-align: center;
}


.skeleton-box {
    height: 14px;
    border-radius: 6px;
    background: linear-gradient(
        90deg,
        #e5e7eb 25%,
        #f3f4f6 37%,
        #e5e7eb 63%
    );
    background-size: 400% 100%;
    animation: shimmer 1.2s ease infinite;
}

@keyframes shimmer {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: 0 0;
    }
}

/* size helpers */
.w-60 { width: 60px; }
.w-80 { width: 80px; }
.w-100 { width: 100px; }
.w-120 { width: 120px; }
.w-140 { width: 140px; }

.skeleton-row td {
    padding: 10px 6px;
}

#cert-table-body tr {
    animation: fadeIn 0.25s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(3px); }
    to { opacity: 1; transform: translateY(0); }
}

/*Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 20px 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid #3b82f6;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.pagination button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.35);
}

.pagination button:active {
    transform: scale(0.96);
}

.pagination button:disabled {
    background: #93c5fd;
    border-color: #93c5fd;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

#pagination-info {
    padding: 6px 12px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #1e3a8a;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
}

.search button {
    padding: 8px 16px;
    margin-left: 8px;
    border: 1px solid #3b82f6;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.search button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.35);
}

.search button:active {
    transform: scale(0.96);
}

.search button:disabled {
    background: #93c5fd;
    border-color: #93c5fd;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}
