/* my-articles.css - Premium Visual Style v2 */

:root{
  --primary: #5b8def;
  --primary-500: #6366f1;
  --primary-600: #3b82f6;
  --primary-700: #2563eb;
  --accent: #7c3aed;
  --accent-light: #a78bfa;
  --muted: #64748b;
  --muted-light: #94a3b8;
  --success: #10b981;
  --success-light: #34d399;
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-light: #f87171;
  --card: #ffffff;
  --page-bg: linear-gradient(135deg, #667eea15 0%, #764ba215 50%, #f8fafc 100%);
  --glass: rgba(255,255,255,0.75);
  --glass-strong: rgba(255,255,255,0.92);
  --border: rgba(99,102,241,0.08);
  --border-hover: rgba(99,102,241,0.15);
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-1: 0 4px 20px rgba(99,102,241,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-2: 0 12px 40px rgba(99,102,241,0.12), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-glow: 0 0 40px rgba(99,102,241,0.15);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  --transition-smooth: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

*{box-sizing:border-box;margin:0;padding:0}
body{
  font-family:'Poppins',system-ui,-apple-system,Segoe UI,Roboto,'Helvetica Neue',Arial;
  background:var(--page-bg);
  background-attachment: fixed;
  color:#0f172a;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.5;
  min-height:100vh;
}

/* Decorative background elements */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  right: -30%;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(99,102,241,0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

body::after {
  content: '';
  position: fixed;
  bottom: -30%;
  left: -20%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(124,58,237,0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
}

/* Header - Premium Glass Effect */
.main-header{
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.75));
  position:sticky;top:0;z-index:100;
  border-bottom:1px solid rgba(99,102,241,0.08);
  box-shadow: 0 4px 30px rgba(0,0,0,0.03);
}
.header-container{
  max-width:1280px;margin:0 auto;padding:16px 24px;display:flex;gap:20px;align-items:center;justify-content:space-between
}
.logo-section{display:flex;align-items:center;gap:14px}
.logo{height:48px;display:block;filter: drop-shadow(0 2px 8px rgba(99,102,241,0.15));transition:transform .3s var(--transition-smooth)}
.logo:hover{transform:scale(1.05) rotate(-2deg)}
.logo-section h1{font-size:1.25rem;font-weight:700;background:var(--gradient-primary);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}

.header-nav{display:flex;gap:6px;align-items:center;flex:1;justify-content:center}
.header-nav a{
  color:var(--muted);
  text-decoration:none;
  padding:10px 18px;
  border-radius:12px;
  font-weight:600;
  font-size:0.95rem;
  transition:all .28s var(--transition-smooth);
  position:relative;
  overflow:hidden;
}
.header-nav a::before{
  content:'';
  position:absolute;
  inset:0;
  background:var(--gradient-primary);
  opacity:0;
  transition:opacity .28s;
  z-index:-1;
  border-radius:inherit;
}
.header-nav a:hover{
  transform:translateY(-3px);
  color:var(--primary-600);
  box-shadow:0 8px 24px rgba(99,102,241,0.12);
}
.header-nav a.active{
  color:white;
  background:var(--gradient-primary);
  box-shadow:0 8px 24px rgba(99,102,241,0.25);
}
.header-nav a.active::before{opacity:1}
.header-nav a.btn-primary{
  background:var(--gradient-primary);
  color:white !important;
  box-shadow:0 6px 20px rgba(99,102,241,0.25);
  padding:12px 20px;
}
.header-nav a.btn-primary:hover{
  transform:translateY(-4px) scale(1.02);
  box-shadow:0 12px 32px rgba(99,102,241,0.35);
}

/* User Section - Avatar Dropdown */
.user-section{display:flex;align-items:center;gap:14px}
.user-dropdown{position:relative}
.avatar-btn{
  width:44px;height:44px;
  border-radius:50%;
  border:2px solid rgba(99,102,241,0.15);
  background:var(--gradient-primary);
  cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;
  transition:all .25s var(--transition-smooth);
  padding:0;
}
.avatar-btn:hover{
  transform:scale(1.08);
  border-color:var(--primary-500);
  box-shadow:0 4px 16px rgba(99,102,241,0.3);
}
.user-avatar{
  width:100%;height:100%;
  object-fit:cover;
  display:none;
}
.user-avatar.loaded{display:block}
.user-initial{
  font-size:1.1rem;
  font-weight:700;
  color:white;
  text-transform:uppercase;
}
.user-avatar.loaded + .user-initial{display:none}

/* Dropdown Menu */
.dropdown-menu{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  min-width:280px;
  background:var(--glass-strong);
  backdrop-filter:blur(20px);
  border-radius:var(--radius);
  border:1px solid var(--border);
  box-shadow:var(--shadow-2);
  opacity:0;
  visibility:hidden;
  transform:translateY(-10px) scale(0.95);
  transition:all .2s var(--transition-smooth);
  z-index:1000;
  overflow:hidden;
}
.dropdown-menu.active{
  opacity:1;
  visibility:visible;
  transform:translateY(0) scale(1);
}
.dropdown-header{
  display:flex;
  align-items:center;
  gap:12px;
  padding:16px;
  background:linear-gradient(135deg, rgba(99,102,241,0.08), rgba(124,58,237,0.05));
}
.dropdown-avatar{
  width:48px;height:48px;
  border-radius:50%;
  object-fit:cover;
  border:2px solid rgba(99,102,241,0.2);
  display:none;
}
.dropdown-avatar.loaded{display:block}
.dropdown-initial{
  width:48px;height:48px;
  border-radius:50%;
  background:var(--gradient-primary);
  display:flex;align-items:center;justify-content:center;
  font-size:1.25rem;font-weight:700;color:white;
  text-transform:uppercase;
  flex-shrink:0;
}
.dropdown-avatar.loaded + .dropdown-initial{display:none}
.dropdown-user-info{
  display:flex;flex-direction:column;
  overflow:hidden;
}
.dropdown-name{
  font-weight:600;font-size:0.95rem;
  color:#0f172a;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.dropdown-email{
  font-size:0.85rem;
  color:var(--muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.dropdown-divider{
  height:1px;
  background:var(--border);
  margin:0;
}
.dropdown-item{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 16px;
  font-size:0.95rem;
  color:var(--muted);
  text-decoration:none;
  transition:all .2s;
  cursor:pointer;
  border:none;
  background:none;
  width:100%;
  text-align:left;
}
.dropdown-item i{font-size:1.1rem}
.dropdown-item:hover{
  background:rgba(99,102,241,0.06);
  color:var(--primary-600);
}
.dropdown-logout{color:var(--danger)}
.dropdown-logout:hover{
  background:rgba(239,68,68,0.06);
  color:var(--danger);
}

/* Main Content */
.main-content{padding:32px 24px;min-height:calc(100vh - 96px)}
.container{max-width:1280px;margin:0 auto}

/* Filter Section - Premium Glass Card */
.filter-section{
  display:flex;
  flex-direction:column;
  gap:16px;
  padding:24px;
  background:var(--glass-strong);
  backdrop-filter:blur(20px);
  border-radius:var(--radius-lg);
  border:1px solid var(--border);
  box-shadow:var(--shadow-1);
  margin-bottom:28px;
  position:relative;
  overflow:hidden;
}
.filter-section::before{
  content:'';
  position:absolute;
  top:0;left:0;right:0;
  height:4px;
  background:var(--gradient-primary);
}
.filter-section h2{
  font-size:1.5rem;
  font-weight:700;
  background:var(--gradient-primary);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
  margin-bottom:8px;
}
.filter-controls{display:flex;gap:16px;flex-wrap:wrap;align-items:center}

/* Search Box - Enhanced */
.search-box{position:relative;flex:1;min-width:260px}
.search-box i{
  position:absolute;
  left:16px;
  top:50%;
  transform:translateY(-50%);
  color:var(--muted-light);
  font-size:1.1rem;
  transition:color .2s;
}
.search-box input{
  width:100%;
  padding:14px 18px 14px 48px;
  border-radius:14px;
  border:2px solid var(--border);
  background:white;
  font-size:0.95rem;
  transition:all .25s var(--transition-smooth);
}
.search-box input::placeholder{color:var(--muted-light)}
.search-box input:focus{
  outline:none;
  border-color:var(--primary-500);
  box-shadow:0 0 0 4px rgba(99,102,241,0.1), 0 8px 24px rgba(99,102,241,0.12);
}
.search-box:focus-within i{color:var(--primary-500)}

/* Filter Group */
.filter-group{display:flex;align-items:center;gap:10px}
.filter-group label{font-weight:600;color:var(--muted);font-size:0.9rem}
.filter-group select{
  padding:12px 40px 12px 16px;
  border-radius:12px;
  border:2px solid var(--border);
  background:white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236366f1'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 12px center;
  background-size:20px;
  appearance:none;
  font-weight:500;
  font-size:0.95rem;
  cursor:pointer;
  transition:all .2s;
}
.filter-group select:focus{
  outline:none;
  border-color:var(--primary-500);
  box-shadow:0 0 0 4px rgba(99,102,241,0.1);
}

/* Controls right side */
.controls-right{display:flex;gap:10px;align-items:center}

/* Buttons - Premium Style */
.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:12px 20px;
  border-radius:14px;
  border:none;
  cursor:pointer;
  font-weight:600;
  font-size:0.95rem;
  transition:all .28s var(--transition-smooth);
  position:relative;
  overflow:hidden;
}
.btn::after{
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(255,255,255,0.2), transparent);
  opacity:0;
  transition:opacity .2s;
}
.btn:hover::after{opacity:1}

.btn-primary{
  background:var(--gradient-primary);
  color:#fff;
  box-shadow:0 8px 28px rgba(99,102,241,0.25);
}
.btn-primary:hover{
  transform:translateY(-4px) scale(1.02);
  box-shadow:0 16px 40px rgba(99,102,241,0.35);
}
.btn-primary:active{transform:translateY(-2px) scale(1)}

.btn-secondary{
  background:white;
  border:2px solid var(--border);
  color:var(--muted);
}
.btn-secondary:hover{
  border-color:var(--primary-500);
  color:var(--primary-600);
  background:rgba(99,102,241,0.04);
  transform:translateY(-3px);
  box-shadow:var(--shadow-1);
}

.btn-ghost{
  background:transparent;
  border:2px solid var(--border);
  color:#0f172a;
}
.btn-ghost:hover{
  background:rgba(99,102,241,0.06);
  border-color:var(--border-hover);
  transform:translateY(-3px);
}

.btn-danger{
  background:linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color:white;
  box-shadow:0 8px 24px rgba(239,68,68,0.25);
}
.btn-danger:hover{
  transform:translateY(-4px);
  box-shadow:0 12px 32px rgba(239,68,68,0.35);
}

.btn-icon{
  display:inline-grid;
  place-items:center;
  width:44px;
  height:44px;
  border-radius:12px;
  background:var(--glass-strong);
  border:2px solid var(--border);
  transition:all .25s;
}
.btn-icon:hover{
  background:var(--gradient-primary);
  color:white;
  border-color:transparent;
  transform:scale(1.08);
}

/* Articles Grid - Premium Cards */
.articles-container{min-height:320px}
.articles-list{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(520px, 1fr));
  gap:24px;
}

.article-card{
  background:var(--glass-strong);
  backdrop-filter:blur(10px);
  border-radius:var(--radius-lg);
  padding:20px;
  display:grid;
  grid-template-columns:140px 1fr 130px;
  gap:20px;
  align-items:start;
  border:2px solid var(--border);
  box-shadow:var(--shadow-1);
  transition:all .32s var(--transition-smooth);
  position:relative;
  overflow:hidden;
}
.article-card::before{
  content:'';
  position:absolute;
  top:0;left:0;
  width:100%;height:100%;
  background:var(--gradient-primary);
  opacity:0;
  transition:opacity .3s;
  z-index:-1;
}
.article-card:hover{
  transform:translateY(-8px) scale(1.01);
  box-shadow:var(--shadow-2), var(--shadow-glow);
  border-color:rgba(99,102,241,0.2);
}

/* Article Thumbnail */
.article-thumbnail{
  width:140px;
  height:100px;
  border-radius:14px;
  object-fit:cover;
  background:linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border:2px solid var(--border);
  transition:transform .3s var(--transition-smooth);
}
.article-card:hover .article-thumbnail{
  transform:scale(1.05);
}
.article-thumbnail.placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:2rem;
  color:var(--muted-light);
  background:linear-gradient(135deg, rgba(99,102,241,0.05) 0%, rgba(124,58,237,0.05) 100%);
}

/* Article Info */
.article-info{min-width:0}
.article-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:8px;
}
.article-title{
  font-size:1.1rem;
  font-weight:700;
  color:#0f172a;
  text-decoration:none;
  transition:all .2s;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.article-title:hover{
  background:var(--gradient-primary);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}

/* Status Badges - Premium */
.article-status{
  padding:8px 14px;
  border-radius:999px;
  font-weight:700;
  font-size:0.8rem;
  text-transform:uppercase;
  letter-spacing:0.5px;
  white-space:nowrap;
}
.article-status.pending{
  background:linear-gradient(135deg, rgba(245,158,11,0.12) 0%, rgba(251,191,36,0.08) 100%);
  color:#b45309;
  border:1px solid rgba(245,158,11,0.2);
}
.article-status.approved{
  background:linear-gradient(135deg, rgba(16,185,129,0.12) 0%, rgba(52,211,153,0.08) 100%);
  color:#059669;
  border:1px solid rgba(16,185,129,0.2);
}
.article-status.rejected{
  background:linear-gradient(135deg, rgba(239,68,68,0.1) 0%, rgba(248,113,113,0.06) 100%);
  color:#dc2626;
  border:1px solid rgba(239,68,68,0.2);
}

.article-excerpt{
  color:var(--muted);
  margin:10px 0 14px;
  line-height:1.6;
  font-size:0.9rem;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.article-meta{
  display:flex;
  gap:16px;
  flex-wrap:wrap;
  color:var(--muted-light);
  font-size:0.85rem;
}
.article-meta span{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  background:rgba(99,102,241,0.04);
  border-radius:8px;
}
.article-meta span i{color:var(--primary-500)}

.rejected-reason{
  margin-top:12px;
  padding:12px 16px;
  background:linear-gradient(135deg, rgba(239,68,68,0.06) 0%, rgba(248,113,113,0.03) 100%);
  border-left:4px solid var(--danger);
  border-radius:12px;
  color:#7f1d1d;
  font-size:0.9rem;
  line-height:1.5;
}

/* Actions Column - Premium */
.article-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items:stretch;
}
.article-actions .btn{
  width:100%;
  justify-content:center;
  padding:10px 16px;
  font-size:0.9rem;
}
.article-actions .btn-edit{
  background:var(--gradient-primary);
  color:#fff;
  box-shadow:0 6px 20px rgba(99,102,241,0.2);
}
.article-actions .btn-edit:hover{
  box-shadow:0 10px 28px rgba(99,102,241,0.3);
}
.article-actions .btn-view{
  background:white;
  border:2px solid var(--border);
  color:var(--muted);
}
.article-actions .btn-view:hover{
  border-color:var(--primary-500);
  color:var(--primary-600);
}
.article-actions .btn-delete{
  background:rgba(239,68,68,0.04);
  border:2px dashed rgba(239,68,68,0.25);
  color:var(--danger);
}
.article-actions .btn-delete:hover{
  background:rgba(239,68,68,0.1);
  border-style:solid;
  border-color:var(--danger);
}

/* Pagination - Premium */
.pagination{
  display:flex;
  gap:8px;
  justify-content:center;
  margin-top:32px;
  padding:20px;
  background:var(--glass);
  border-radius:var(--radius);
  border:1px solid var(--border);
}
.pagination button{
  padding:10px 16px;
  border-radius:12px;
  border:2px solid var(--border);
  background:white;
  font-weight:600;
  cursor:pointer;
  transition:all .25s var(--transition-smooth);
}
.pagination button:hover:not(:disabled){
  border-color:var(--primary-500);
  color:var(--primary-600);
  transform:translateY(-2px);
}
.pagination button.active{
  background:var(--gradient-primary);
  color:white;
  border-color:transparent;
  box-shadow:0 6px 20px rgba(99,102,241,0.25);
}
.pagination button:disabled{
  opacity:0.5;
  cursor:not-allowed;
}

/* Empty State - Premium */
.empty-state{
  padding:60px 40px;
  border-radius:var(--radius-lg);
  text-align:center;
  background:var(--glass-strong);
  backdrop-filter:blur(10px);
  box-shadow:var(--shadow-1);
  border:2px dashed var(--border);
}
.empty-state i{
  font-size:4rem;
  background:var(--gradient-primary);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
  margin-bottom:20px;
  display:block;
}
.empty-state h3{
  font-size:1.5rem;
  font-weight:700;
  color:#0f172a;
  margin-bottom:10px;
}
.empty-state p{
  color:var(--muted);
  margin-bottom:24px;
  max-width:400px;
  margin-left:auto;
  margin-right:auto;
}

/* Loading State */
.loading{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:60px;
  gap:20px;
}
.spinner{
  width:48px;
  height:48px;
  border:4px solid var(--border);
  border-top-color:var(--primary-500);
  border-radius:50%;
  animation:spin 0.8s linear infinite;
}
@keyframes spin{
  to{transform:rotate(360deg)}
}
.loading p{
  color:var(--muted);
  font-weight:500;
}

/* Modal - Premium Glass */
.modal{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(15,23,42,0.6);
  backdrop-filter:blur(8px);
  align-items:center;
  justify-content:center;
  z-index:200;
  padding:20px;
}
.modal.active{display:flex}
.modal-content{
  background:white;
  padding:32px;
  border-radius:var(--radius-lg);
  max-width:480px;
  width:100%;
  box-shadow:var(--shadow-2);
  animation:modalSlideUp 0.3s var(--transition-smooth);
}
@keyframes modalSlideUp{
  from{opacity:0;transform:translateY(20px) scale(0.95)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
.modal-content h2{
  font-size:1.4rem;
  font-weight:700;
  margin-bottom:12px;
  color:#0f172a;
}
.modal-content p{
  color:var(--muted);
  margin-bottom:24px;
  line-height:1.6;
}
.modal-actions{
  display:flex;
  gap:12px;
  justify-content:flex-end;
}

/* Responsive - Premium */
@media (max-width:1024px){
  .articles-list{grid-template-columns:1fr}
  .article-card{grid-template-columns:120px 1fr 110px}
  .article-thumbnail{width:120px;height:85px}
}

@media (max-width:768px){
  .header-container{flex-direction:column;align-items:stretch;gap:16px}
  .header-nav{justify-content:center;overflow-x:auto;padding-bottom:8px;gap:4px}
  .header-nav a{padding:8px 12px;font-size:0.9rem;white-space:nowrap}
  .user-section{justify-content:center}
  
  .filter-section{padding:20px}
  .filter-controls{flex-direction:column}
  .search-box{min-width:100%}
  
  .article-card{
    grid-template-columns:1fr;
    gap:16px;
    padding:18px;
  }
  .article-thumbnail{
    width:100%;
    height:180px;
    border-radius:14px;
  }
  .article-actions{
    flex-direction:row;
    justify-content:stretch;
    gap:8px;
  }
  .article-actions .btn{flex:1}
}

@media (max-width:480px){
  .main-content{padding:20px 16px}
  .filter-section{padding:16px}
  .article-card{padding:14px}
  .article-thumbnail{height:140px}
  .modal-content{padding:24px}
}

/* Micro-interactions & Animations */
@keyframes fadeInUp{
  from{opacity:0;transform:translateY(20px)}
  to{opacity:1;transform:translateY(0)}
}

.article-card{
  animation:fadeInUp 0.5s var(--transition-smooth) backwards;
}
.article-card:nth-child(1){animation-delay:0.05s}
.article-card:nth-child(2){animation-delay:0.1s}
.article-card:nth-child(3){animation-delay:0.15s}
.article-card:nth-child(4){animation-delay:0.2s}
.article-card:nth-child(5){animation-delay:0.25s}
.article-card:nth-child(6){animation-delay:0.3s}

/* Focus states for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible{
  outline:3px solid rgba(99,102,241,0.4);
  outline-offset:2px;
}

/* Smooth scrollbar */
::-webkit-scrollbar{width:8px;height:8px}
::-webkit-scrollbar-track{background:rgba(99,102,241,0.04);border-radius:10px}
::-webkit-scrollbar-thumb{background:linear-gradient(180deg,var(--primary-500),var(--accent));border-radius:10px}
::-webkit-scrollbar-thumb:hover{background:var(--primary-600)}
