:root{
  --pm-surface: rgba(255,255,255,0.78);
  --pm-border: rgba(15,23,42,0.08);
}

.container-narrow{ max-width: 1180px; }
.mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

.app-body{
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(13,110,253,0.14), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(25,135,84,0.10), transparent 55%),
    linear-gradient(180deg, #f8fafc 0%, #f3f4f6 60%, #eef2ff 100%);
}

.app-navbar{
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(17,24,39,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.app-navbar .navbar-brand,
.app-navbar .nav-link,
.app-navbar .navbar-text{
  color: #fff !important;
}

.app-navbar .nav-link{
  opacity: 0.9;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus{
  opacity: 1;
}

.app-navbar .navbar-toggler{
  border-color: rgba(255,255,255,0.25);
}

.app-navbar .navbar-toggler-icon{
  filter: invert(1);
}

.navbar-brand{
  font-weight: 700;
  letter-spacing: 0.2px;
}

.card{
  border: 1px solid var(--pm-border);
  border-radius: 16px;
  overflow: visible;
}

.card-hover{
  position: relative;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.card-hover:hover{
  transform: translateY(-2px);
  z-index: 10;
  box-shadow: 0 16px 40px rgba(15,23,42,0.08);
}

.card-hover .dropdown{ z-index: 20; }

.alert{
  border-radius: 14px;
  border: 1px solid var(--pm-border);
}

.btn{
  border-radius: 12px;
}

.btn-outline-secondary{
  border-color: rgba(148,163,184,0.7);
}

.dropdown-menu{
  border-radius: 14px;
  border: 1px solid var(--pm-border);
  box-shadow: 0 18px 40px rgba(15,23,42,0.10);
  z-index: 2000;
}

.project-thumb{
  width: 100%;
  height: 160px;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  overflow: hidden;
  background: #f1f5f9;
  border-bottom: 1px solid rgba(15,23,42,0.08);
}

/* Projects list view */
.projects-view-list #projectsGrid .project-card{
  border-radius: 16px;
  overflow: hidden;
}

.projects-view-list #projectsGrid .project-card{
  display: flex;
  flex-direction: row;
  align-items: stretch;
  height: 160px;
}


#projectsGrid .project-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.projects-view-list #projectsGrid .project-thumb{
  width: 240px;
  height: 160px;
  border-top-right-radius: 0;
  border-bottom-left-radius: 16px;
  border-right: 1px solid rgba(15,23,42,0.08);
  border-bottom: 0;
}


.projects-view-list #projectsGrid .card-body{
  flex: 1;
}

.projects-view-list #projectsGrid .card-hover:hover{
  transform: none;
}

.project-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-thumb-placeholder{
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(15,23,42,0.35);
  font-size: 32px;
}

.view-thumb{
  width: 100%;
  height: 160px;
  object-fit: cover;
  object-position: top center!important;
  background: #f8f9fa;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.08);
}

.input-group-text{
  border-radius: 12px 0 0 12px;
}

.form-control, .form-select{
  border-radius: 12px;
}

.form-control:focus{
  box-shadow: 0 0 0 0.25rem rgba(13,110,253,0.12);
}

/* nicer separators on edit page cards */
.card.border-0.shadow-sm{ background: var(--pm-surface); }

/* Clickable whole project card */
.card-hover{ cursor: pointer; }
.card-hover .stretched-link{ z-index: 1; }
.card-hover .dropdown,
.card-hover .btn,
.card-hover form{ position: relative; z-index: 3; }
.dropdown-menu{ z-index: 2000; }

/* navbar center slot */
.app-navbar-row{
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.app-navbar-left{
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-navbar-center{
  flex: 1;
  display: flex;
  justify-content: center;
}

.app-navbar-center .input-group{
  width: min(520px, 100%);
}

.app-navbar-right{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  white-space: nowrap;
}

/* projects header layout */
.pm-top-right{
  justify-content: flex-end;
}

.pm-new-project{
  display: flex;
  justify-content: center;
}

.pm-new-project-form{
  display: flex;
  gap: 10px;
  width: min(500px, 100%);
}

.pm-new-project-form input{
  flex: 2 1 0%;
}

.pm-new-project-form button{
  flex: 1 0 auto;
  white-space: nowrap;
}

/* thumbs: show top and fixed height */
.project-thumb{
  height: 180px;
  overflow: hidden;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  border-bottom: 1px solid rgba(15,23,42,0.08);
}

.project-thumb img{
  object-position: top center;
}

/* list view sizing and alignment */
.projects-view-list .projects-view-list #projectsGrid .project-thumb{
  width: 240px;
  height: 160px;
  border-top-right-radius: 0;
  border-bottom-left-radius: 16px;
  border-right: 1px solid rgba(15,23,42,0.08);
  border-bottom: 0;
}

.projects-view-list .pm-project-row{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

.pm-project-info{
  flex: 1;
  min-width: 0;
}

.pm-project-title{
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.2;
}

.projects-view-list .pm-project-title{
  font-size: 1.25rem;
}

.pm-project-actions-inline{
  display: flex;
  gap: 8px;
}

.pm-project-actions-stack{
  display: none;
  min-width: 160px;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  justify-content: center;
}

.pm-actions-label{
  text-align: center;
}

.pm-project-actions-fab{
  position: absolute!important;
  right: 12px;
  bottom: 12px;
}

.pm-project-actions-fab .btn{
  border-radius: 999px;
}

.projects-view-list .pm-project-actions-fab{
  display: none;
}

/* In kafelki view pokaz tylko FAB */
.pm-project-actions-stack{
  /* default hidden already */
}


.projects-view-list .pm-project-actions-stack{
  display: flex;
}

.projects-view-list .pm-project-actions-stack form{
  margin: 0;
}

/* view switch animations */
@keyframes pmFadeOut{
  from{ opacity: 1; transform: translateY(0); }
  to{ opacity: 0; transform: translateY(6px); }
}
@keyframes pmFadeIn{
  from{ opacity: 0; transform: translateY(-6px); }
  to{ opacity: 1; transform: translateY(0); }
}
#projectsGrid.pm-fade-out{
  animation: pmFadeOut 0.14s ease both;
}
#projectsGrid.pm-fade-in{
  animation: pmFadeIn 0.22s ease both;
}

.projects-view-list #projectsGrid .card-body{
  display: flex;
  align-items: center;
}
