/* =========================================================
   PORTAL - EMPLOYEE SELF-SERVICE
   ========================================================= */

/* ---- BODY ---- */
.portal-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f3f4f6;
    font-size: 16px;
    font-family: 'Segoe UI', 'Arial', sans-serif;
    color: #222;
}

/* ---- HEADER ---- */
.portal-header {
    background: #1e293b;
    color: #fff;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.portal-header-inner {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.portal-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
}

.portal-brand-icon { font-size: 20px; }

/* ---- NAV ---- */
.portal-nav {
    display: flex;
    gap: 4px;
}

.portal-nav-link {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #cbd5e1;
    text-decoration: none;
    transition: background .15s, color .15s;
}

.portal-nav-link:hover {
    background: rgba(255,255,255,.1);
    color: #fff;
}

.portal-nav-link.active {
    background: #2563eb;
    color: #fff;
}

/* ---- USER ---- */
.portal-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.portal-user-photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,.2);
}

.portal-user-name {
    font-size: 13px;
    font-weight: 500;
    color: #e2e8f0;
}

.portal-logout-form { display: flex; }

.portal-logout-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background .15s, color .15s;
}

.portal-logout-btn:hover {
    background: rgba(255,255,255,.1);
    color: #fff;
}

/* ---- MAIN ---- */
.portal-main {
    flex: 1;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
}

/* ---- FOOTER ---- */
.portal-footer {
    text-align: center;
    padding: 16px;
    font-size: 12px;
    color: #9ca3af;
    border-top: 1px solid #e5e7eb;
}

/* =========================================================
   PORTAL CARDS
   ========================================================= */

.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.portal-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    transition: box-shadow .15s;
}

.portal-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

.portal-card-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.portal-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.portal-card-desc {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 12px;
}

.portal-card-link {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

.portal-card-link:hover {
    text-decoration: underline;
}

/* =========================================================
   PORTAL WELCOME
   ========================================================= */

.portal-welcome {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: #fff;
    border-radius: 14px;
    padding: 28px 32px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.portal-welcome-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,.3);
}

.portal-welcome-text h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 4px;
}

.portal-welcome-text p {
    font-size: 14px;
    opacity: .85;
    margin: 0;
}

/* =========================================================
   PORTAL AUTH PAGES (LOGIN / LINK SENT)
   ========================================================= */

.portal-auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111827;
}

.portal-auth-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 24px;
}

.portal-auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 14px;
    padding: 32px 28px;
    box-shadow: 0 20px 40px rgba(0,0,0,.35);
    text-align: center;
}

.portal-auth-card h2 {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px;
}

.portal-auth-card .portal-auth-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
}

.portal-auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
}

.portal-auth-form label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.portal-auth-form input[type="email"] {
    height: 42px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

.portal-auth-form input[type="email"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

.portal-auth-btn {
    height: 42px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

.portal-auth-btn:hover {
    background: #1d4ed8;
}

.portal-auth-message {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
}

.portal-auth-message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.portal-auth-message.success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.portal-auth-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.portal-auth-back {
    display: inline-block;
    margin-top: 16px;
    font-size: 13px;
    color: #2563eb;
    text-decoration: none;
}

.portal-auth-back:hover {
    text-decoration: underline;
}

.portal-login-link {
    display: block;
    margin-top: 16px;
    font-size: 13px;
    color: #2563eb;
    text-decoration: none;
}

.portal-login-link:hover {
    text-decoration: underline;
}

/* === FORM ORTALAMA === */
.portal-center-container {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === MODERN TARİH ALANI === */
.portal-date-row {
    display: flex;
    gap: 24px;
    margin-bottom: 18px;
}
.portal-date-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.portal-date-group label {
    margin-bottom: 6px;
    font-weight: 600;
}
.portal-date-group input[type="date"] {
    font-size: 1.13em;
    padding: 12px 14px;
    border-radius: 7px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    transition: border .2s;
}
.portal-date-group input[type="date"]:focus {
    border: 1.5px solid #2563eb;
    outline: none;
}


/* === UYGULAMA HEADER & NAV === */
.app-header {
    background: #1e293b;
    color: #fff;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    position: sticky;
    top: 0;
    z-index: 100;
}
.app-header-inner {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.app-logo {
    height: 36px;
    width: auto;
    margin-right: 10px;
    vertical-align: middle;
}
.app-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}
.app-nav {
    display: flex;
    gap: 8px;
}
.app-nav-link {
    padding: 7px 18px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    color: #cbd5e1;
    text-decoration: none;
    transition: background .15s, color .15s;
    font-family: inherit;
}
.app-nav-link:hover, .app-nav-link.active {
    background: #2563eb;
    color: #fff;
}
.app-header-user {
    display: flex;
    align-items: center;
    gap: 10px;
}
.portal-user-photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,.2);
}
.portal-user-name {
    font-size: 14px;
    font-weight: 500;
    color: #e2e8f0;
}
.portal-logout-form { display: flex; }
.portal-logout-btn, .logout-red {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 6px;
    transition: background .15s, color .15s;
    font-family: inherit;
    font-weight: 600;
}
.portal-logout-btn:hover, .logout-red:hover {
    background: rgba(239,68,68,0.08);
    color: #b91c1c;
}
.portal-main {
    flex: 1;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 18px;
    font-family: 'Segoe UI', 'Arial', sans-serif;
    font-size: 16px;
    color: #222;
}
.portal-footer, .app-footer {
    text-align: center;
    padding: 16px;
    font-size: 13px;
    color: #9ca3af;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    font-family: 'Segoe UI', 'Arial', sans-serif;
}

/* =========================================================
   PORTAL BUTTONS (aligned with app .btn styles)
   ========================================================= */

.portal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .05s ease;
}

.portal-btn:hover {
    background: #f1f5f9;
    color: #1f2937;
}

.portal-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37,99,235,.25);
}

.portal-btn:active {
    transform: translateY(0.5px);
}

.portal-btn-primary {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}

.portal-btn-primary:hover {
    border-color: #1d4ed8;
    background: #1d4ed8;
    color: #fff;
}

.portal-btn-danger {
    border-color: #dc2626;
    background: #dc2626;
    color: #fff;
}

.portal-btn-danger:hover {
    border-color: #b91c1c;
    background: #b91c1c;
    color: #fff;
}

.portal-btn-sm {
    height: 32px;
    padding: 0 10px;
    font-size: 13px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {
    .app-header-inner { gap: 12px; }
    .app-title { display: none; }
    .app-nav { gap: 2px; }
    .app-nav-link { padding: 6px 10px; font-size: 13px; }
    .portal-user-name { display: none; }
    .portal-main { padding: 12px; }
    .portal-grid { grid-template-columns: 1fr; }
    .portal-welcome { flex-direction: column; text-align: center; padding: 20px; }
}

/* ==== TABLE FULL WIDTH & CARD ==== */
.portal-table-card {
    width: 100%;
    max-width: 100vw;
    padding: 24px 32px;
    box-sizing: border-box;
}
.portal-table-wide {
    width: 100%;
    min-width: 900px;
    font-size: 1.08em;
}
.portal-table-wide th, .portal-table-wide td {
    padding: 14px 18px;
    font-size: 1em;
}
@media (max-width: 1100px) {
    .portal-table-wide { min-width: 600px; }
    .portal-table-card { padding: 12px 4px; }
}
@media (max-width: 700px) {
    .portal-table-wide { min-width: 320px; font-size: 0.98em; }
    .portal-table-card { padding: 2px 0; }
}

/* Bilgilerim sayfası ortalama ve genişlik */
.portal-center-container {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.portal-form-card {
    width: 100%;
    max-width: 950px;
    margin: 0 auto;
}
