/* PortfolioLab — Frontend CSS v2 */

/* ═══════════════════════════════════════
   LOGIN
═══════════════════════════════════════ */
.pl-login-wrapper {
    --pl-blue:    #1a56db;
    --pl-blue-d:  #1145b6;
    --pl-border:  #e2e8f0;
    --pl-text:    #1e293b;
    --pl-muted:   #64748b;
    --pl-bg:      #f8fafc;
    --pl-radius:  10px;

    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 3rem 1rem;
    min-height: 70vh;
    background: var(--pl-bg);
}

.pl-login-box {
    background: #fff;
    border: 1px solid var(--pl-border);
    border-radius: var(--pl-radius);
    box-shadow: 0 4px 24px rgba(0,0,0,.07);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 420px;
}

.pl-login-header { text-align: center; margin-bottom: 1.75rem; }
.pl-logo          { max-height: 52px; width: auto; }
.pl-logo-text     { font-size: 1.4rem; font-weight: 700; color: var(--pl-text); }
.pl-subtitle      { color: var(--pl-muted); font-size: .9rem; margin: .4rem 0 0; }

/* Notices */
.pl-notice {
    border-radius: 8px;
    padding: .7rem 1rem;
    font-size: .875rem;
    margin-bottom: 1.1rem;
}
.pl-notice--info  { background:#eff6ff; color:#1d4ed8; border:1px solid #bfdbfe; }
.pl-notice--error { background:#fef2f2; color:#b91c1c; border:1px solid #fca5a5; }

/* Form */
.pl-form { display: flex; flex-direction: column; gap: .9rem; }

.pl-field label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--pl-text);
    margin-bottom: .35rem;
}

.pl-input-wrap { position: relative; display: flex; align-items: center; }

.pl-icon {
    position: absolute;
    left: .7rem;
    width: 17px; height: 17px;
    color: var(--pl-muted);
    pointer-events: none;
}

.pl-input {
    width: 100%;
    padding: .62rem .75rem .62rem 2.35rem;
    border: 1.5px solid var(--pl-border);
    border-radius: var(--pl-radius);
    font-size: .95rem;
    color: var(--pl-text);
    background: #fff;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
}
.pl-input:focus {
    outline: none;
    border-color: var(--pl-blue);
    box-shadow: 0 0 0 3px rgba(26,86,219,.12);
}

.pl-eye {
    position: absolute; right: .6rem;
    background: none; border: none;
    cursor: pointer; color: var(--pl-muted);
    display: flex; align-items: center;
    padding: .2rem;
    transition: color .15s;
}
.pl-eye:hover { color: var(--pl-blue); }
.pl-eye svg   { width: 17px; height: 17px; }

.pl-remember {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .85rem;
    color: var(--pl-muted);
    cursor: pointer;
}
.pl-remember input { accent-color: var(--pl-blue); }

.pl-submit {
    width: 100%;
    padding: .72rem;
    background: var(--pl-blue);
    color: #fff;
    border: none;
    border-radius: var(--pl-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    transition: background .15s, transform .1s;
    margin-top: .2rem;
}
.pl-submit:hover:not(:disabled) { background: var(--pl-blue-d); }
.pl-submit:active:not(:disabled) { transform: scale(.98); }
.pl-submit:disabled { opacity: .65; cursor: not-allowed; }

.pl-spinner { width: 18px; height: 18px; animation: pl-spin .7s linear infinite; }
@keyframes pl-spin { to { transform: rotate(360deg); } }

.pl-no-reg {
    text-align: center;
    font-size: .8rem;
    color: var(--pl-muted);
    margin: 1.1rem 0 0;
}

.pl-already-in { text-align: center; padding: 1.5rem; }
.pl-already-in a { color: var(--pl-blue); font-weight: 600; }

/* ═══════════════════════════════════════
   PORTAL
═══════════════════════════════════════ */
.pl-portal-wrapper {
    --pl-blue:   #1a56db;
    --pl-border: #e2e8f0;
    --pl-text:   #1e293b;
    --pl-muted:  #64748b;
    --pl-bg:     #f8fafc;
    --pl-radius: 10px;

    min-height: 100vh;
    background: var(--pl-bg);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header */
.pl-portal-header {
    background: #fff;
    border-bottom: 1px solid var(--pl-border);
    padding: .85rem 1.5rem;
    position: sticky; top: 0;
    z-index: 100;
}

.pl-portal-header__inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.pl-portal-logo     { max-height: 36px; width: auto; }
.pl-portal-site-name{ font-weight: 700; font-size: 1.1rem; color: var(--pl-text); }

.pl-portal-header__user {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.pl-portal-greeting {
    font-size: .875rem;
    color: var(--pl-muted);
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
}
.pl-portal-greeting strong { color: var(--pl-text); }

.pl-role-badge {
    background: #ede9fe;
    color: #5b21b6;
    font-size: .72rem;
    font-style: normal;
    font-weight: 600;
    padding: .15rem .55rem;
    border-radius: 20px;
}

.pl-logout-btn {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .85rem;
    color: var(--pl-muted);
    text-decoration: none;
    padding: .35rem .75rem;
    border: 1px solid var(--pl-border);
    border-radius: 8px;
    transition: color .15s, border-color .15s, background .15s;
}
.pl-logout-btn:hover {
    color: #b91c1c;
    border-color: #fca5a5;
    background: #fef2f2;
    text-decoration: none;
}

/* Main */
.pl-portal-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.pl-sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.pl-section {
    background: #fff;
    border: 1px solid var(--pl-border);
    border-radius: var(--pl-radius);
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

.pl-section__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--pl-text);
    margin: 0 0 .85rem;
    padding-bottom: .6rem;
    border-bottom: 2px solid #ede9fe;
}

.pl-section__content {
    font-size: .9rem;
    color: var(--pl-muted);
    line-height: 1.6;
}

.pl-section__content p:first-child { margin-top: 0; }
.pl-section__content p:last-child  { margin-bottom: 0; }

.pl-portal-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--pl-muted);
}

.pl-btn-config {
    display: inline-block;
    margin-top: 1rem;
    padding: .6rem 1.25rem;
    background: var(--pl-blue);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 600;
}
.pl-btn-config:hover { opacity: .9; text-decoration: none; color: #fff; }

@media (max-width: 600px) {
    .pl-login-box    { padding: 2rem 1.1rem; }
    .pl-portal-main  { padding: 1.25rem 1rem; }
    .pl-sections-grid{ grid-template-columns: 1fr; }
}

/* ── Menú de navegación del portal ──────────────────────── */
.pl-portal-header__left {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.pl-portal-nav {
    display: flex;
    align-items: center;
    gap: .25rem;
    flex-wrap: wrap;
}

.pl-portal-nav__link {
    padding: .35rem .85rem;
    font-size: .875rem;
    color: var(--pl-muted);
    text-decoration: none;
    border-radius: 6px;
    transition: background .15s, color .15s;
    font-weight: 500;
}

.pl-portal-nav__link:hover,
.pl-portal-nav__link.active {
    background: #f1f5f9;
    color: var(--pl-text);
    text-decoration: none;
}

/* ── Secciones span (ancho múltiple) ─────────────────────── */
.pl-section--span-2 { grid-column: span 2; }
.pl-section--span-3 { grid-column: span 3; }

@media (max-width: 768px) {
    .pl-section--span-2,
    .pl-section--span-3 { grid-column: span 1; }

    .pl-portal-header__left { gap: 1rem; }
    .pl-portal-nav { gap: .1rem; }
    .pl-portal-nav__link { padding: .3rem .6rem; font-size: .8rem; }
}
