/* ============================================================
   DRIVE — Style strony Kmalecha Drive
============================================================ */

.drive-wrap {
  max-width: 860px;
  margin: 0 auto;
}

/* ---- Login card ------------------------------------------- */
.drive-login-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--r-xl);
  padding: 3rem 2.5rem;
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
}

.drive-login-card__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.drive-login-card h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.drive-login-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.drive-login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.drive-login-form input {
  width: 100%;
  background: var(--dark);
  border: 1px solid var(--dark-border);
  border-radius: var(--r-md);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--tr);
}

.drive-login-form input:focus       { border-color: var(--blue); }
.drive-login-form input::placeholder { color: var(--text-muted); }

.drive-login-error {
  font-size: 0.85rem;
  color: #f87171;
  text-align: center;
  min-height: 1.2em;
}

/* ---- Dashboard -------------------------------------------- */
.drive-dashboard         { display: none; }
.drive-dashboard.visible { display: block; }

.drive-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.drive-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.drive-avatar {
  width: 40px; height: 40px;
  background: var(--blue-glow);
  border: 1px solid var(--blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue);
  font-family: var(--font-display);
}

.drive-user-name { font-weight: 500; font-size: 0.95rem; }
.drive-user-sub  { font-size: 0.78rem; color: var(--text-secondary); }

/* ---- Upload zone ------------------------------------------ */
.drive-upload-zone {
  background: var(--dark-card);
  border: 2px dashed var(--dark-border);
  border-radius: var(--r-xl);
  padding: 2.5rem;
  text-align: center;
  margin-bottom: 2rem;
  transition: all var(--tr);
  cursor: pointer;
  position: relative;
}

.drive-upload-zone:hover,
.drive-upload-zone.dragover {
  border-color: var(--blue);
  background: var(--blue-glow-s);
}

.drive-upload-zone__icon { font-size: 2.5rem; margin-bottom: 0.75rem; }

.drive-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: rgba(91, 173, 255, 0.06);
  border: 1px solid var(--dark-border);
  border-radius: var(--r-md);
  padding: 0.7rem 1rem;
  margin-top: 0.85rem;
  line-height: 1.55;
}

.drive-hint strong { color: var(--text-secondary); }

.drive-hint--upload { margin-bottom: 1.75rem; }

.drive-upload-zone h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.drive-upload-zone p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.drive-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

/* ---- Progress bar ----------------------------------------- */
.drive-progress      { display: none; margin-top: 1rem; }
.drive-progress.show { display: block; }

.drive-progress__bar-wrap {
  height: 6px;
  background: var(--dark-border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.drive-progress__bar {
  height: 100%;
  background: var(--blue);
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 0%;
}

.drive-progress__label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-align: center;
}

/* ---- Files list ------------------------------------------- */
.drive-files-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.drive-files-header h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}

.drive-files-count {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.drive-files-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.drive-file-item {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--r-lg);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color var(--tr);
}

.drive-file-item:hover { border-color: rgba(91,173,255,0.3); }

.drive-file-icon { font-size: 1.75rem; flex-shrink: 0; }

.drive-file-info { flex: 1; min-width: 0; }

.drive-file-name {
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}

.drive-file-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.drive-file-uploader {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.drive-file-uploader::before {
  content: '👤';
  font-size: 0.75rem;
}

.drive-file-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.drive-btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.45rem 1rem;
  border-radius: 100px;
  background: var(--blue);
  color: #0a0a0a;
  transition: all var(--tr);
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
}

.drive-btn-download:hover {
  background: #7ac3ff;
  transform: translateY(-1px);
}

.drive-btn-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(248,113,113,0.4);
  color: #f87171;
  font-size: 1.1rem;
  transition: all var(--tr);
  cursor: pointer;
  background: rgba(248,113,113,0.08);
  font-family: var(--font-body);
}

.drive-btn-delete:hover {
  border-color: #f87171;
  background: rgba(248,113,113,0.18);
  transform: scale(1.1);
}

.drive-empty {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
}

.drive-empty__icon { font-size: 3rem; margin-bottom: 1rem; }

/* ---- Notice ----------------------------------------------- */
.drive-notice {
  font-size: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: var(--r-md);
  margin-bottom: 1rem;
  display: none;
}

.drive-notice.show    { display: block; }
.drive-notice.success { background: rgba(34,197,94,0.1);   color: #22c55e; border: 1px solid rgba(34,197,94,0.2); }
.drive-notice.error   { background: rgba(248,113,113,0.1); color: #f87171; border: 1px solid rgba(248,113,113,0.2); }

/* ---- Stats ------------------------------------------------ */
.drive-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.drive-stat {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--r-lg);
  padding: 1rem 1.25rem;
  text-align: center;
}

.drive-stat__value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--blue);
}

.drive-stat__label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
}

/* ============================================================
   DRIVE NOTES
============================================================ */

.drive-notes-section {
  margin-top: 2.5rem;
  margin-bottom: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--dark-border);
}

.drive-notes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.drive-note-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  position: relative;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color var(--tr);
}

.drive-note-card:hover { border-color: rgba(91,173,255,0.3); }

.drive-note-card__actions {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity var(--tr);
}

.drive-note-card:hover .drive-note-card__actions { opacity: 1; }

.drive-note-card__edit,
.drive-note-card__del {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1px solid transparent;
  cursor: pointer;
  background: none;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--tr);
  color: var(--text-muted);
}

.drive-note-card__edit:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-glow-s);
}

.drive-note-card__del:hover {
  border-color: #f87171;
  color: #f87171;
  background: rgba(248,113,113,0.1);
}

.drive-note-card__title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--blue);
  padding-right: 3.5rem;
  word-break: break-word;
  line-height: 1.3;
}

.drive-note-card__body {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

.drive-note-card__date {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: auto;
}

.drive-note-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 100px;
  background: var(--blue-glow);
  color: var(--blue);
  border: 1px solid rgba(91,173,255,0.2);
  letter-spacing: 0.03em;
  width: fit-content;
}

/* Checklista w karcie */
.drive-note-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}

.drive-note-check-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.83rem;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1.4;
}

.drive-note-check-item input[type="checkbox"] {
  flex-shrink: 0;
  width: 14px; height: 14px;
  accent-color: var(--blue);
  cursor: pointer;
}

.drive-note-check-item--done {
  text-decoration: line-through;
  color: var(--text-muted);
}

.drive-note-progress {
  font-size: 0.72rem;
  color: var(--text-muted);
  padding-top: 0.5rem;
  border-top: 1px solid var(--dark-border);
  margin-top: auto;
}

/* Karta dodawania */
.drive-note-add-card {
  background: var(--dark-card);
  border: 2px dashed var(--dark-border);
  border-radius: var(--r-lg);
  min-height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--tr);
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.drive-note-add-card:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-glow-s);
}

.drive-note-add-card__icon { font-size: 1.5rem; }

/* Selektor typu w modalu */
.drive-note-type-selector {
  display: flex;
  gap: 0.5rem;
}

.drive-note-type-btn {
  flex: 1;
  padding: 0.6rem;
  border-radius: var(--r-md);
  border: 1px solid var(--dark-border);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  cursor: pointer;
  background: var(--dark);
  transition: all var(--tr);
  text-align: center;
}

.drive-note-type-btn:hover { border-color: var(--blue); color: var(--blue); }

.drive-note-type-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #0a0a0a;
  font-weight: 600;
}

/* Wiersze checklisty w modalu */
.drive-checklist-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.drive-checklist-item-check {
  flex-shrink: 0;
  width: 16px !important;
  height: 16px;
  cursor: pointer;
  accent-color: var(--blue);
}

.drive-checklist-item-text {
  flex: 1;
  background: var(--dark);
  border: 1px solid var(--dark-border);
  border-radius: var(--r-md);
  padding: 0.6rem 0.75rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--tr);
}

.drive-checklist-item-text:focus { border-color: var(--blue); }

.drive-checklist-item-remove {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--dark-border);
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--tr);
  flex-shrink: 0;
}

.drive-checklist-item-remove:hover { border-color: #f87171; color: #f87171; }

/* ---- Responsive ------------------------------------------- */
@media (max-width: 768px) {
  .drive-login-card   { padding: 2rem 1.5rem; }
  .drive-stats        { grid-template-columns: 1fr 1fr; /* 2×2 */ }
  .drive-file-item    { flex-wrap: wrap; }
  .drive-file-actions { width: 100%; justify-content: flex-end; }
  .drive-header-bar   { flex-direction: column; align-items: flex-start; }
  .drive-notes-grid   { grid-template-columns: 1fr; }
}
