/*
Theme Name: ARC Securities Ltd
Theme URI: https://arcsecuritiesltd.com
Author: Md. Hasanuzzaman
Description: Custom WordPress theme for ARC Securities Ltd (TREC # 100) featuring live DSE market summary, secure client login modal, backoffice client dashboard with Chart.js, notification bell, IPO application portal, and printable PDF statements.
Version: 3.1.0
Text Domain: arc-securities
*/

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f8f9fa;
  color: #333;
  overflow-x: hidden;
}

/* Social Sidebar */
.social-sidebar {
  position: fixed;
  left: 0;
  top: 35%;
  display: flex;
  flex-direction: column;
  z-index: 9999;
}

.social-sidebar a {
  display: flex;
  align-items: center;
  width: 45px;             
  height: 45px;
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  white-space: nowrap;
  overflow: hidden;
  transition: width 0.4s ease, background-color 0.3s ease;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
}

.social-sidebar a i {
  min-width: 45px;
  text-align: center;
  font-size: 18px;
}

.social-sidebar a span {
  opacity: 0;
  transition: opacity 0.3s ease;
  margin-left: 5px;
  font-size: 14px;
  font-weight: 500;
}

.social-sidebar a:hover { width: 140px; }
.social-sidebar a:hover span { opacity: 1; }
.social-sidebar .notice-btn { background-color: #28a745; margin-bottom: 32px; }
.social-sidebar .facebook { background-color: #3b5998; }
.social-sidebar .whatsapp { background-color: #25D366; }

/* Top Nav */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 50px;
  background: #fff;
  border-bottom: 1px solid #ddd;
  position: relative;
}
.logo h2 { font-size: 24px; color: #1e3d59; margin: 0; }
.logo h2 span { color: #17a2b8; }

.main-menu ul { display: flex; list-style: none; gap: 20px; align-items: center; }
.main-menu a { text-decoration: none; color: #555; font-weight: 500; transition: color 0.3s; }
.main-menu a.active, .main-menu a:hover { color: #28a745; border-bottom: 2px solid #28a745; }

.mobile-menu-toggle { display: none; font-size: 24px; cursor: pointer; color: #333; background: none; border: none; }
.user-icon a { font-size: 24px; color: #555; }
.nav-right-actions { display: flex; align-items: center; gap: 15px; }

/* Contact Info Bar */
.info-bar {
  display: flex;
  justify-content: space-around;
  background: #fff;
  padding: 15px 50px;
  border-bottom: 2px solid #eee;
  flex-wrap: wrap;
  gap: 15px;
}
.info-item { display: flex; align-items: center; gap: 12px; }
.info-item i { font-size: 24px; color: #333; }
.info-item.whatsapp i { color: #25D366; }
.info-item p { font-size: 14px; }

/* Hero Section */
.hero-section {
  display: grid;
  grid-template-columns: 1.2fr 2fr 1.5fr;
  gap: 20px;
  padding: 40px 50px;
  background-color: #fff;
}
.hero-left h1 { font-size: 28px; color: #28a745; margin-top: 10px; }

.trec-badge-box {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #28a745, #20c997);
  color: #fff;
  padding: 6px 16px;
  font-weight: bold;
  font-size: 16px;
  margin: 12px 0;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
}

.trec-label { margin-right: 5px; opacity: 0.9; }
.trec-number { background: rgba(255, 255, 255, 0.2); padding: 2px 6px; border-radius: 4px; }

/* Tables */
.card-header {
  background: #1e293b;
  color: #fff;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}
.table-responsive { width: 100%; overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 15px;
  font-size: 13px;
  white-space: nowrap;
}
.data-table th, .data-table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
}
.data-table th { background-color: #f1f5f9; }
.up { color: green; font-weight: bold; }
.down { color: red; font-weight: bold; }

/* Tabs */
.tab-buttons { display: flex; flex-wrap: wrap; }
.tab-btn {
  flex: 1; padding: 8px 4px; border: none; background: #e2e8f0; cursor: pointer; font-size: 12px; font-weight: 600;
}
.tab-btn.active { background: #000; color: #fff; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Features Section */
.features-section { padding: 40px 50px; text-align: center; background: #fff; }
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 30px; text-align: left; }
.feature-item { display: flex; gap: 15px; background: #f8f9fa; padding: 20px; border-radius: 6px; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.feature-item i { font-size: 28px; color: #333; }

/* Visit Office Section */
.visit-office-section { background: #ffffff; padding: 50px; border-top: 1px dotted #333; border-bottom: 1px dotted #333; margin: 40px 0 0 0; }
.visit-office-title { text-align: center; font-size: 26px; font-weight: 600; color: #111; margin-bottom: 40px; text-transform: uppercase; }
.visit-office-container { display: flex; justify-content: space-between; align-items: flex-start; max-width: 1200px; margin: 0 auto; gap: 40px; }
.visit-opening-col { flex: 1; }
.visit-opening-col h3 { font-size: 16px; font-weight: 600; color: #111; margin-bottom: 15px; }
.visit-opening-col p { display: flex; align-items: center; gap: 10px; font-size: 15px; color: #333; }
.visit-contact-col { flex: 1; text-align: right; }
.visit-contact-col h3 { font-size: 16px; font-weight: 600; color: #111; margin-bottom: 15px; }
.visit-contact-col p { display: flex; align-items: center; justify-content: flex-end; gap: 10px; font-size: 15px; color: #333; margin-bottom: 6px; }

/* --- BACKOFFICE DASHBOARD STYLES --- */
.dashboard-wrapper { display: flex; min-height: 100vh; background-color: #f0f2f5; }
.dash-sidebar { width: 260px; background-color: #0d1b2a; color: #ffffff; display: flex; flex-direction: column; justify-content: space-between; position: sticky; top: 0; height: 100vh; }
.dash-sidebar-header { padding: 20px; background-color: #1b263b; border-bottom: 1px solid rgba(255,255,255,0.1); }
.dash-sidebar-header h2 { font-size: 18px; color: #ffffff; margin-bottom: 4px; }
.dash-sidebar-header p { font-size: 12px; color: #94a3b8; }
.dash-nav-list { list-style: none; padding: 20px 0; flex: 1; }
.dash-nav-list li a { display: flex; align-items: center; gap: 14px; padding: 14px 24px; color: #cbd5e1; text-decoration: none; font-size: 14px; cursor: pointer; transition: all 0.3s ease; }
.dash-nav-list li a:hover, .dash-nav-list li a.active { background-color: #0077b6; color: #ffffff; border-left: 4px solid #00b4d8; }
.dash-user-profile { padding: 15px 20px; background-color: #1b263b; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid rgba(255,255,255,0.1); }
.dash-user-info { display: flex; align-items: center; gap: 12px; }
.dash-user-avatar { width: 38px; height: 38px; background-color: #0077b6; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 14px; }
.dash-user-details h4 { font-size: 14px; color: #fff; margin: 0; }
.dash-user-details span { font-size: 11px; color: #94a3b8; }
.dash-logout-btn { background: none; border: none; color: #cbd5e1; font-size: 18px; cursor: pointer; transition: color 0.3s; }
.dash-logout-btn:hover { color: #ef4444; }

.dash-main-content { flex: 1; padding: 30px 40px; overflow-y: auto; }
.dash-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.dash-title-area h1 { font-size: 24px; color: #1e293b; font-weight: 700; margin-bottom: 4px; }
.dash-title-area p { font-size: 13px; color: #64748b; }
.dash-topbar-right { display: flex; align-items: center; gap: 15px; }
.status-badge { background-color: #d1fae5; color: #065f46; padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }

/* Notification Bell Dropdown */
.notif-wrapper { position: relative; }
.notif-bell-btn { background: #fff; border: 1px solid #cbd5e1; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #475569; position: relative; transition: all 0.3s; }
.notif-bell-btn:hover { background: #f1f5f9; color: #0284c7; }
.notif-badge { position: absolute; top: -2px; right: -2px; background-color: #ef4444; color: #fff; font-size: 10px; font-weight: bold; padding: 2px 6px; border-radius: 10px; }
.notif-dropdown { display: none; position: absolute; right: 0; top: 48px; width: 320px; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); z-index: 999; overflow: hidden; }
.notif-dropdown.active { display: block; }
.notif-dropdown-header { padding: 12px 16px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; font-weight: 600; font-size: 14px; color: #1e293b; display: flex; justify-content: space-between; }
.notif-list { list-style: none; max-height: 250px; overflow-y: auto; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; font-size: 13px; color: #334155; transition: background 0.2s; }
.notif-item:hover { background: #f8fafc; }
.notif-item strong { display: block; color: #0f172a; margin-bottom: 2px; }
.notif-item span { font-size: 11px; color: #94a3b8; }

.refresh-btn { background: #fff; border: 1px solid #cbd5e1; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #475569; transition: all 0.3s; }
.refresh-btn:hover { background: #f1f5f9; transform: rotate(90deg); }

/* Dashboard Stat Cards */
.dash-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px; }
.stat-card { background: #ffffff; padding: 22px; border-radius: 10px; box-shadow: 0 2px 4px rgba(0,0,0,0.02); border: 1px solid #e2e8f0; }
.stat-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.stat-header span { font-size: 13px; color: #64748b; font-weight: 500; }
.stat-header i { font-size: 18px; color: #0ea5e9; }
.stat-value { font-size: 22px; font-weight: 700; color: #0f172a; margin-bottom: 8px; }
.stat-subtext { font-size: 12px; color: #64748b; }

.dash-section { display: none; }
.dash-section.active { display: block; }
.dash-grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-bottom: 30px; }
.dash-panel { background: #ffffff; border-radius: 10px; border: 1px solid #e2e8f0; box-shadow: 0 2px 4px rgba(0,0,0,0.02); overflow: hidden; padding: 20px; }
.dash-panel-title { font-size: 16px; font-weight: 600; color: #1e293b; margin-bottom: 15px; display: flex; align-items: center; gap: 8px; }
.dash-panel-title i { color: #0ea5e9; }

.table-filter-bar { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.table-search-input { padding: 8px 14px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; width: 100%; max-width: 250px; outline: none; }
.table-search-input:focus { border-color: #0ea5e9; }

.holdings-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.holdings-table th, .holdings-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #f1f5f9; }
.holdings-table th { background-color: #f8fafc; color: #475569; font-weight: 600; }

.badge-ipo { padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: bold; }
.badge-applied { background: #dbeafe; color: #1e40af; }
.badge-allotted { background: #d1fae5; color: #065f46; }
.badge-pending { background: #fef3c7; color: #92400e; }

.btn-apply-ipo { background: #0ea5e9; color: #fff; border: none; padding: 6px 14px; border-radius: 4px; cursor: pointer; font-size: 12px; font-weight: 600; transition: background 0.2s; }
.btn-apply-ipo:hover { background: #0284c7; }

.statement-controls { display: flex; gap: 15px; align-items: center; margin-bottom: 20px; background: #fff; padding: 20px; border-radius: 8px; border: 1px solid #e2e8f0; flex-wrap: wrap; }
.statement-controls input[type="date"] { padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; }
.btn-pdf-print { background: #10b981; color: #fff; border: none; padding: 10px 20px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.btn-pdf-print:hover { background: #059669; }

/* Footer Section */
footer.main-footer { background-color: #f2fcf9; padding: 60px 80px 40px; }
.footer-inner-container { display: grid; grid-template-columns: 1.2fr 1.8fr 1.5fr; gap: 50px; max-width: 1400px; margin: 0 auto; }
.footer-about-text { font-size: 14px; color: #777; line-height: 1.6; margin-top: 15px; margin-bottom: 22px; }
.footer-circle-socials { display: flex; gap: 12px; }
.footer-circle-socials a { width: 36px; height: 36px; border-radius: 50%; background-color: #10b981; color: #ffffff; display: flex; align-items: center; justify-content: center; text-decoration: none; font-size: 16px; }

.footer-services-col h3, .footer-newsletter-col h3 { font-size: 18px; color: #2c3e50; font-weight: 600; margin-bottom: 20px; }
.services-pill-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.services-pill-list li a { display: block; background-color: #d1fae5; color: #111827; text-align: center; text-decoration: none; padding: 10px 15px; border-radius: 4px; font-size: 12px; font-weight: 500; }

.newsletter-input-box { width: 100%; padding: 10px; border: 1px solid #10b981; border-radius: 4px; margin-bottom: 10px; }
.newsletter-submit-btn { padding: 8px 18px; background-color: #10b981; color: #fff; border: none; border-radius: 4px; cursor: pointer; }

.copyright-bar { background-color: #ebfaf5; border-top: 1.5px solid #10b981; padding: 22px 80px; text-align: right; font-size: 15px; color: #374151; }
.copyright-bar a { color: #0d9488; text-decoration: none; font-weight: 500; }

/* Modal Styles */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); z-index: 10000; justify-content: center; align-items: center; padding: 15px; }
.modal-box { background: #111; color: #fff; padding: 30px; width: 100%; max-width: 380px; border-radius: 6px; position: relative; }
.close-btn { position: absolute; top: 10px; right: 15px; font-size: 24px; cursor: pointer; color: #fff; }
.auth-tabs { display: flex; margin-bottom: 20px; }
.auth-tab-btn { flex: 1; padding: 10px; background: #333; color: #fff; border: none; cursor: pointer; }
.auth-tab-btn.active { background: #28a745; }
.auth-form { display: none; flex-direction: column; gap: 12px; }
.auth-form.active { display: flex; }
.auth-form input { padding: 10px; border: none; border-radius: 4px; width: 100%; background-color: #f1f5f9; color: #333; }
.submit-btn { padding: 10px; background: #17a2b8; color: #fff; border: none; cursor: pointer; border-radius: 4px; font-weight: 600; }

@media print {
  body * { visibility: hidden; }
  #printable-statement-area, #printable-statement-area * { visibility: visible; }
  #printable-statement-area { position: absolute; left: 0; top: 0; width: 100%; background: #fff; padding: 20px; }
  .statement-controls, .dash-sidebar, .social-sidebar, header, footer, .copyright-bar { display: none !important; }
}

@media (max-width: 992px) {
  .hero-section { grid-template-columns: 1fr; padding: 20px; }
  .hero-right { grid-column: span 1; }
  .dashboard-wrapper { flex-direction: column; }
  .dash-sidebar { width: 100%; height: auto; position: static; }
  .dash-stats-grid, .dash-grid-2col { grid-template-columns: 1fr; }
  .dash-main-content { padding: 20px; }
}