/* assets/css/frontend.css */

/* Reset & Base */
body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f9f9f9;
    color: #333;
}
a {
    color: #006FBF;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Containers */
.doktorantura-login-container,
.doktorantura-lost-password-container,
.doktorantura-dashboard-container,
.doktorantura-step-container {
    max-width: 600px;
    margin: 2rem auto;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.doktorantura-dashboard-container,
.doktorantura-step-container {
    max-width: 100%;
}

/* Titles & Notices */
.doktorantura-page-title {
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    text-align: center;
}
.doktorantura-notices .notice {
    margin-bottom: 1rem;
}

/* Buttons */
.doktorantura-btn-primary,
button.button-primary {
    background-color: #D4042F;
    color: #fff;
    border: none;
    padding: .75rem 1.25rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}
.doktorantura-btn-primary:hover,
button.button-primary:hover {
    background-color: #A41230;
    color:#fff;
}
button.button-secondary,
.doktorantura-btn-secondary {
    background-color: #111d30;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: .95rem;
    cursor: pointer;
}
button.button-secondary:hover,
.doktorantura-btn-secondary:hover {
    background-color: #1f3659;
}

/* Form Inputs */
.doktorantura-form input[type="email"],
.doktorantura-form input[type="password"],
.doktorantura-form input[type="text"],
.doktorantura-form input[type="url"],
.doktorantura-form input[type="file"] {
    width: 100%;
    padding: .6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

/* Progress Navigation */
.dashboard-progress .progress-steps {
    display: flex;
    justify-content: space-between;
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}
.progress-steps li {
    flex: 1;
    text-align: center;
    position: relative;
    font-weight: 600;
}
.progress-steps li:before {
    content: '';
    position: absolute;
    top: 50%;
    left: -50%;
    width: 100%;
    height: 4px;
    background: #ccc;
    transform: translateY(-50%);
    z-index: -1;
}
.progress-steps li:first-child:before { display: none; }
.progress-steps li.step-completed a,
.progress-steps li.step-active a { color: #D4042F; }
.progress-steps li.step-completed:before,
.progress-steps li.step-active:before { background: #0073AA; }
.progress-steps li.step-locked span { color: #999; }

/* Dashboard Summaries */
.dashboard-steps-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px,1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.step-summary {
    background: #fafafa;
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.step-summary.current { border: 2px solid #D4042F; }

/* Fields Grid (Steps 1–3) */
.fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(32%,1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Field Card */
.field-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}
.field-label {
    font-weight: 600;
    margin-bottom: .75rem;
}
.field-body {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: .5rem;
}
.field-input {
    flex: 1 1 100%;
}
.upload-btn {
    flex: 0 0 auto;
}
.uploading-indicator {
    font-style: italic;
    color: #888;
}
.view-link {
    color: #111d30;
    text-decoration: none;
    font-size: .9rem;
    align-self: center;
    text-decoration: underline;
}
.view-link:hover {
    text-decoration: none;
}

/* Status Badge */
.status-badge {
    padding: .3rem .6rem;
    border-radius: 12px;
    font-size: .85rem;
    font-weight: 600;
    text-transform: capitalize;
}
.status-none {
    background: #ebebeb;
    color: #666;
}
.status-waiting {
    background: #fff3cd;
    color: #856404;
}
.status-approved {
    background: #d4edda;
    color: #155724;
}
.status-redo {
    background: #f8d7da;
    color: #721c24;
}

/* Links Card (Step 1) */
.links-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.links-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .75rem;
}
.link-input {
    flex: 1 1 calc(50% - .5rem);
    min-width: 200px;
}
.add-link-button {
    margin-top: .5rem;
}

/* Form Submit */
.form-submit {
    text-align: right;
    margin-top: 1rem;
}

.expert-reviews-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}
.field-card.inline {
  flex: 1 1 calc(20% - 1rem); /* до 5 в ряд */
  min-width: 150px;
}
@media (max-width: 768px) {
    .fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100%,1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
  .field-card.inline {
    flex: 1 1 100%;
  }
}
.expert-reviews-row .field-label {
  font-weight: bold;
  margin-bottom: 0.5rem;
}
.expert-reviews-row {
  margin-bottom: 30px;
}

.doktorantura-multistep {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  margin-bottom: 30px;
  gap: 16px;
  flex-wrap: wrap;
}

.step-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  background: #f2f2f2;
  color: #333;
  font-size: 14px;
  width: 100px;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.step-link:hover:not(.disabled):not(.active) {
  background: #e8e8e8;
}

.step-link .step-number {
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 4px;
}

.step-link.active {
  background: #c60f13;
  color: #fff;
}

.step-link.disabled {
  pointer-events: none;
  opacity: 0.5;
}

.step-nav-buttons {
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 2rem;
}

.step-nav-buttons .button {
  min-width: 180px;
  text-align: center;
  padding: 12px 20px;
  font-size: 16px;
}


/* Скрываем нативный input */
input[type="file"] {
  opacity: 0;
  position: absolute;
  z-index: -1;
}

/* Оборачивающий элемент — должен быть рядом с input */
.file-wrapper {
  position: relative;
  display: inline-block;
}

/* Стиль красивой кнопки */
.file-trigger {
  display: inline-block;
  padding: 10px 20px;
  background: #e71820;
  color: white;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
  margin-bottom: 10px;
  text-align: center;
}

.file-trigger:hover {
  background: #ac0e14;
}
.expert-reviews-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.expert-reviews-wrapper .field-card.inline {
  flex: 1 1 calc(20% - 10px); /* 5 колонок */
  min-width: 160px;
  max-width: calc(20% - 10px);
}

.dashboard-admin-docs {
    margin-top: 3rem;
    padding: 1.5rem;
    border: 1px solid #ddd;
    background: #f9f9f9;
    border-radius: 8px;
}

.dashboard-admin-docs h2 {
    margin-top: 0;
}

.dashboard-admin-docs .button {
    margin-top: 1rem;
}
.dashboard-admin-docs .button:hover{
    color:#fafafa}

.add-button{
    flex: 0 0 100%;
    order: 1;
}

.doktorantura-progress-wrapper {
  margin-bottom: 1.5em;
  max-width: 900px;
  margin: 0 auto;

}
.progress-bar-background {
  background: #eee;
  height: 20px;
  border-radius: 10px;
  overflow: hidden;
}
.progress-bar-fill {
  background: #d60000;
  height: 100%;
  width: 0;
  transition: width 0.5s ease;
}
.progress-bar-label {
  margin-top: 5px;
  font-weight: bold;
  text-align: center;
}
@media (max-width: 768px) {
  .expert-reviews-wrapper .field-card.inline {
    flex: 1 1 100%;
  }
}

/* Responsive */
@media (max-width: 600px) {
    .links-wrapper .link-input {
        flex: 1 1 100%;
    }
}
@media (max-width: 480px) {
    .progress-steps li:before { display: none; }
    .dashboard-steps-summary { grid-template-columns: 1fr; }
    .link-input { flex: 1 1 100%; }
}