/* =====================================================
   GLOBAL LAYOUT (Pastel Mint Theme)
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&family=IBM+Plex+Sans+Thai:wght@300;400;500;600&display=swap');

:root {
  /* Pastel Mint */
  --mint-50:  #f4fdf9;
  --mint-100: #e0f7ed;
  --mint-200: #b8ebd4;
  --mint-300: #8fdfba;
  --mint-400: #6dd3a3;
  --mint-500: #4caf8a;
  --mint-600: #3d8c6f;
  --mint-700: #2f6b54;
  --mint-800: #234d3d;

  --mint-900: #25A385;

  /* Sage Green */
  --sage-100: #d9ebd9;
  --sage-300: #8cc68c;
  --sage-400: #66b366;
  --sage-500: #4d994d;

  /* Warm Gray */
  --gray-50:  #fafaf9;
  --gray-100: #f5f5f3;
  --gray-200: #e8e8e5;
  --gray-300: #d4d4cf;
  --gray-400: #a8a8a0;
  --gray-500: #787870;
  --gray-600: #5a5a52;

  --bg-base:        #f9fcfb;
  --bg-card:        #ffffff;
  --bg-subtle:      #e8f7f0;
  --bg-muted:       var(--mint-100);

  --border:         #e0ede5;
  --border-strong:  var(--mint-200);

  --text-primary:   #2f5045;
  --text-secondary: #4a7060;
  --text-muted:     #7a9b8b;
  --text-light:     #a0bfbc;

  --accent:         #e8a020;
  --accent-light:   #f5d98a;
  --danger:         #d95b5b;
  --danger-dark:    #b83c3c;
  --success:        #3a9e6a;

  --shadow-sm:  0 1px 4px rgba(92,189,154,0.06);
  --shadow-md:  0 4px 16px rgba(92,189,154,0.08);
  --shadow-lg:  0 8px 32px rgba(92,189,154,0.12);
  --shadow-inset: inset 0 1px 2px rgba(0,0,0,0.02);

  --radius-sm:  10px;
  --radius-md:  14px;
  --radius-lg:  18px;
  --radius-xl:  24px;

  --font-xs:   12px;
  --font-sm:   13px;
  --font-base: 14px;
  --font-md:   15px;
  --font-lg:   17px;
  --font-xl:   21px;
  --font-2xl:  27px;

  --transition: 0.20s ease;
}

*,
*::before,
*::after{
  box-sizing:border-box;
  margin:0;
  padding:0;
}

/* ลบขีดเส้นใต้และให้สีเหมือนกับ text ปกติ */
a { 
  text-decoration: none; 
  color: inherit; 
}

body{
  font-family:'Kanit',sans-serif;  
  background:var(--bg-base);
}

/* ================= STICKY HEADER ================= */

.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  background: var(--mint-900);
  padding: 10px 24px;
  height: 64px;  
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(92,189,154,0.24);
}

.app-header .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 400;
  font-size: 14px;
  flex-direction: row;
}

.logo{
  display:flex;
  align-items:center;
  gap:12px;
}

.app-header .logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.logo h2 {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.logo-circle{
  width:45px;
  height:45px;
  border-radius:50%;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.logo-circle img{
  width:65%;
}

/* ================= USER ================= */

.user-box{
  display:flex;
  align-items:center;
  gap:8px;
  color: #fff;
}

.user-avatar{
  width:32px;
  height:32px;
  border-radius:50%;
  background:var(--bg-card);
  color: var(--mint-800);
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 2px 6px rgba(92,189,154,0.20);
}

.logout-btn{
  padding:6px 12px;
  border:none;
  border-radius:18px;
  background:#fff;
  color:var(--primary-dark);
  font-size:12px;
  font-weight:500;
  cursor:pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.10);
}

.logout-btn:hover{
  background:#f0f9f8;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.14);
}

/* ================= NAV ================= */

.app-nav{
  position:sticky;
  top:64px;
  z-index:999;

  background:#f5f8f7;
  border-bottom:1px solid #e0ede5;

  padding:8px 16px;

  display:flex;
  gap:8px;

  overflow-x:auto;
}

.app-nav a{
  padding:6px 12px;
  border-radius:8px;
  font-size:13px;
  white-space:nowrap;
  transition: all 0.2s ease;
  color: #5a7870;
}

.app-nav a:hover{
  background:#e8f7f0;
  color: var(--mint-700);
}

.app-nav a.active{
  background: var(--mint-900);
  color:#fff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(92,189,154,0.20);
}

/* ================= CONTAINER ================= */

.container{
  max-width:960px;
  margin:auto;
  padding:20px;
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

/* ================= DESKTOP ================= */

@media (max-width:1200px){

.container{
  max-width: 900px;
}

.forms-grid{
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
}

}

/* ================= TABLET ================= */

@media (max-width:768px){

.app-header{
  padding:10px 16px;
}

.app-header .logo h2{
  font-size:18px;
}

.container{
  padding:16px;
}

.page-header{
  padding:22px 20px;
}

.page-header h1{
  font-size:20px;
}

.forms-grid{
  grid-template-columns: repeat(2,1fr);
  gap:14px;
}

.card,
.section-card,
.card-cause{
  padding:20px;
}

.user-name{
  max-width:90px;
}

}

/* ================= MOBILE ================= */

@media (max-width:480px){

.app-header{
  height:56px;
  padding:8px 12px;
}

.app-nav{
  top:52px;
  padding:6px 10px;
}

.app-nav a{
  font-size:12px;
  padding:5px 10px;
}

.logo-circle{
  width:38px;
  height:38px;
}

.app-header .logo h2{
  font-size:16px;
}

.container{
  padding:12px;
}

.page-header{
  padding:18px 16px;
}

.page-header h1{
  font-size:18px;
}

.page-header p{
  font-size:13px;
}

.forms-grid{
  grid-template-columns:1fr;
}

.form-card{
  padding:16px;
}

.form-icon{
  width:54px;
  height:54px;
}

.user-name{
  display:none;
}

.logout-btn{
  padding:4px 8px;
  font-size:10px;
}

}